Socket
Socket
Sign inDemoInstall

unzipper

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unzipper - npm Package Compare versions

Comparing version 0.9.2 to 0.9.3

13

lib/parse.js

@@ -85,7 +85,10 @@ var util = require('util');

__autodraining = true;
return new Promise(function(resolve,reject) {
entry.pipe(NoopStream());
entry.on('finish',resolve);
entry.on('error',reject);
});
var draining = entry.pipe(NoopStream());
draining.promise = function() {
return new Promise(function(resolve, reject) {
draining.on('finish',resolve);
draining.on('error',reject);
});
};
return draining;
};

@@ -92,0 +95,0 @@

{
"name": "unzipper",
"version": "0.9.2",
"version": "0.9.3",
"description": "Unzip cross-platform streaming API ",

@@ -5,0 +5,0 @@ "author": "Evan Oxfeld <eoxfeld@gmail.com>",

@@ -1,2 +0,2 @@

# unzipper [![Build Status](https://api.travis-ci.org/ZJONSSON/node-unzipper.png)](https://travis-ci.org/ZJONSSON/node-unzipper.svg?branch=master)
# unzipper [![Build Status](https://api.travis-ci.org/ZJONSSON/node-unzipper.png?branch=master)](https://travis-ci.org/ZJONSSON/node-unzipper?branch=master)

@@ -37,5 +37,16 @@ This is a fork of [node-unzip](https://github.com/EvanOxfeld/node-unzip) which has not been maintained in a while. This fork addresses the following issues:

__Important__: If you do not intend to consume an entry stream's raw data, call autodrain() to dispose of the entry's
contents. Otherwise you the stream will halt.
contents. Otherwise you the stream will halt. `.autodrain()` returns an empty stream that provides `error` and `finish` events.
Additionally you can call `.autodrain().promise()` to get the promisified version of success or failure of the autodrain.
```js
// If you want to handle autodrain errors you can either:
entry.autodrain().catch(e => handleError);
// or
entry.autodrain().on('error' => handleError);
```
Here is a quick example:
```js
fs.createReadStream('path/to/archive.zip')

@@ -42,0 +53,0 @@ .pipe(unzipper.Parse())

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc