Security update for permissions_by_term
[yaffs-website] / node_modules / extract-zip / readme.md
1 # extract-zip
2
3 Unzip written in pure JavaScript. Extracts a zip into a directory. Available as a library or a command line program.
4
5 Uses the [`yauzl`](http://npmjs.org/yauzl) ZIP parser.
6
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)
9
10 ## Installation
11
12 Get the library:
13
14 ```
15 npm install extract-zip --save
16 ```
17
18 Install the command line program:
19
20 ```
21 npm install extract-zip -g
22 ```
23
24 ## JS API
25
26 ```js
27 var extract = require('extract-zip')
28 extract(source, {dir: target}, function (err) {
29  // extraction is complete. make sure to handle the err
30 })
31 ```
32
33 ### Options
34
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.
39
40 Default modes are only used if no permissions are set in the zip file.
41
42 ## CLI Usage
43
44 ```
45 extract-zip foo.zip <targetDirectory>
46 ```
47
48 If not specified, `targetDirectory` will default to `process.cwd()`.