in index.js [104:119]
const sequenceFiles = function (fileList, handler, filesContent) {
const fileListCopy = fileList.concat([]);
const nextFilePath = fileListCopy.shift();
JSZipUtils.getBinaryContent(
nextFilePath, (err, nextFileContent) => {
if (err) { throw err; }
if (!filesContent) { filesContent = {}; };
filesContent[nextFilePath] = nextFileContent;
if (fileListCopy.length == 0) {
handler(filesContent);
return;
};
sequenceFiles(fileListCopy, handler, filesContent);
}
);
}