-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
65 lines (65 loc) · 4.33 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"name": "unzip",
"version": "0.1.9",
"description": "Unzip cross-platform streaming API compatible with fstream and fs.ReadStream",
"author": {
"name": "Evan Oxfeld",
"email": "evan.oxfeld@nearinfinity.com"
},
"maintainers": [
{
"name": "Evan Oxfeld",
"email": "evan.oxfeld@nearinfinity.com"
},
{
"name": "Joe Ferner",
"email": "joe.ferner@nearinfinity.com"
}
],
"repository": {
"type": "git",
"url": "https://github.com/nearinfinity/node-unzip.git"
},
"license": "MIT",
"dependencies": {
"fstream": "~0.1.21",
"pullstream": "~0.4.0",
"binary": "~0.3.0",
"readable-stream": "~1.0.0",
"setimmediate": "~1.0.1",
"match-stream": "~0.0.2"
},
"devDependencies": {
"tap": "~0.3.0",
"temp": "~0.4.0",
"dirdiff": "~0.0.1",
"stream-buffers": "~0.2.3"
},
"directories": {
"example": "examples",
"test": "test"
},
"keywords": [
"zip",
"unzip",
"zlib",
"uncompress",
"archive",
"stream",
"extract"
],
"main": "unzip.js",
"scripts": {
"test": "tap ./test/*.js"
},
"readme": "# unzip [![Build Status](https://travis-ci.org/nearinfinity/node-unzip.png)](https://travis-ci.org/nearinfinity/node-unzip)\n\nStreaming cross-platform unzip tool written in node.js.\n\nUnzip provides simple APIs similar to [node-tar](https://github.com/isaacs/node-tar) for parsing and extracting zip files.\nThere are no added compiled dependencies - inflation is handled by node.js's built in zlib support. Unzip is also an\nexample use case of [node-pullstream](https://github.com/nearinfinity/node-pullstream).\n\n## Installation\n\n```bash\n$ npm install unzip\n```\n\n## Quick Examples\n\n### Extract to a directory\n```javascript\nfs.createReadStream('path/to/archive.zip').pipe(unzip.Extract({ path: 'output/path' }));\n```\n\nExtract emits the 'close' event once the zip's contents have been fully extracted to disk.\n\n### Parse zip file contents\n\nProcess each zip file entry or pipe entries to another stream.\n\n__Important__: If you do not intend to consume an entry stream's raw data, call autodrain() to dispose of the entry's\ncontents. Otherwise you risk running out of memory.\n\n```javascript\nfs.createReadStream('path/to/archive.zip')\n .pipe(unzip.Parse())\n .on('entry', function (entry) {\n var fileName = entry.path;\n var type = entry.type; // 'Directory' or 'File'\n var size = entry.size;\n if (fileName === \"this IS the file I'm looking for\") {\n entry.pipe(fs.createWriteStream('output/path'));\n } else {\n entry.autodrain();\n }\n });\n```\n\nOr pipe the output of unzip.Parse() to fstream\n\n```javascript\nvar readStream = fs.createReadStream('path/to/archive.zip');\nvar writeStream = fstream.Writer('output/path');\n\nreadStream\n .pipe(unzip.Parse())\n .pipe(writeStream)\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2012 - 2013 Near Infinity Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/nearinfinity/node-unzip/issues"
},
"homepage": "https://github.com/nearinfinity/node-unzip",
"_id": "unzip@0.1.9",
"_shasum": "12ac4d05c0a19fc4546df4c50ae0a7f4706a9424",
"_resolved": "https://registry.npmjs.org/unzip/-/unzip-0.1.9.tgz",
"_from": "https://registry.npmjs.org/unzip/-/unzip-0.1.9.tgz"
}