module.exports = function()

in lib/fs/unzip.js [11:28]


module.exports = function(zipFilePath, outputdir, fn) {
  if (!fs.existsSync(zipFilePath)) {
    const error = new Error(`File "${zipFilePath}" not found`);
    if (fn) return fn(error);
    throw error;
  }

  const outputPath = outputdir || path.dirname(zipFilePath);

  fs.createReadStream(zipFilePath)
    .pipe(unzip.Extract({
      path: outputPath
    }))
    .on('error', (error) => fn && fn(error))
    .on('close', function() {
      fn && fn(null);
    });
};