zip-lib | const zl = require("zip-lib");
const unzip = new zl.Unzip({
// Called before an item is extracted.
onEntry: function (event) {
if (/^__MACOSX\//.test(event.entryName)) {
// entry name starts with __MACOSX/
event.preventDefault();
}
}
})
unzip.extract("path/to/target.zip", "path/to/target").then(function () {
console.log("done");
}, function (err) {
console.log(err);
});
|