unzip.js 349 B

123456789101112
  1. var promises = require("../lib/promises");
  2. var zipfile = require("../lib/zipfile");
  3. exports.openZip = openZip;
  4. function openZip(options) {
  5. if (options.arrayBuffer) {
  6. return promises.resolve(zipfile.openArrayBuffer(options.arrayBuffer));
  7. } else {
  8. return promises.reject(new Error("Could not find file in options"));
  9. }
  10. }