refactor to share downloading code across all formats

This commit is contained in:
Jaiwanth
2021-06-25 11:16:59 +05:30
parent 91b8b2ac5a
commit 3718826e94
7 changed files with 83 additions and 118 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ const pump = (zipObj: ZipObj) => zipObj.reader ? zipObj.reader.read().then(chunk
}
}) : undefined;
export default function ZIP(underlyingSource: UnderlyingSource) {
export default function streamToZIP(underlyingSource: UnderlyingSource) {
const files = Object.create(null);
const filenames: string[] = [];
const encoder = new TextEncoder();