3 Unzip written in pure JavaScript. Extracts a zip into a directory. Available as a library or a command line program.
5 Uses the [`yauzl`](http://npmjs.org/yauzl) ZIP parser.
7 [![NPM](https://nodei.co/npm/extract-zip.png?global=true)](https://nodei.co/npm/extract-zip/)
8 [![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
15 npm install extract-zip --save
18 Install the command line program:
21 npm install extract-zip -g
27 var extract = require('extract-zip')
28 extract(source, {dir: target}, function (err) {
29 // extraction is complete. make sure to handle the err
35 - `dir` - defaults to `process.cwd()`
36 - `defaultDirMode` - integer - Directory Mode (permissions) will default to `493` (octal `0755` in integer)
37 - `defaultFileMode` - integer - File Mode (permissions) will default to `420` (octal `0644` in integer)
38 - `onEntry` - function - if present, will be called with every entry from the zip file. forwarded from the `entry` event from yauzl.
40 Default modes are only used if no permissions are set in the zip file.
45 extract-zip foo.zip <targetDirectory>
48 If not specified, `targetDirectory` will default to `process.cwd()`.