express-zip
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,6 @@ | ||
2.0.1 / 2016-06-18 | ||
================== | ||
* Fix calling of `cb`, which broke after switching to `zip-stream` | ||
2.0.0 / 2015-01-27 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -60,6 +60,5 @@ /*! | ||
if (err) return cb(err); | ||
zip.finalize(function(bytesZipped) { | ||
cb(null, bytesZipped); | ||
}); | ||
zip.finalize(); | ||
cb(null, zip.getBytesWritten()); | ||
}); | ||
}; |
{ | ||
"name": "express-zip", | ||
"description": "stream multiple files to the browser as a single zip, in pure node.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": { | ||
@@ -9,2 +9,15 @@ "name": "Craig McDonald (thrackle)", | ||
}, | ||
"contributors": [{ | ||
"name": "Tan Li Hau", | ||
"url": "https://github.com/tanhauhau" | ||
}, { | ||
"name": "Vihang Mehta", | ||
"url": "https://github.com/vihangm" | ||
}, { | ||
"name": "Eugene Lynch", | ||
"url": "https://github.com/data-doge" | ||
}, { | ||
"name": "Paul Spicer", | ||
"url": "https://github.com/pdspicer" | ||
}], | ||
"dependencies": { | ||
@@ -15,5 +28,5 @@ "async": "0.9.0", | ||
"devDependencies": { | ||
"mocha": "*", | ||
"chai": "*", | ||
"superagent": "*", | ||
"mocha": "2.1.0", | ||
"chai": "1.10.0", | ||
"superagent": "0.21.0", | ||
"express": "2" | ||
@@ -20,0 +33,0 @@ }, |
@@ -23,2 +23,17 @@ # express-zip | ||
## Full API | ||
```js | ||
/** | ||
* Respond with a ZIP attachment containting `files`, with an optional | ||
* "save as" `filename` (default is attachment.zip), and then call `cb` | ||
* when finished. | ||
* | ||
* @param {Array} files { name: <name>, path: <path> } | ||
* @param {String|Function} filename that will be shown in "save as" dialog | ||
* @param {Function} cb(err, bytesZipped) optional | ||
*/ | ||
res.zip = function(files, filename, cb) { | ||
``` | ||
## Credits | ||
@@ -25,0 +40,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7060
67
52