Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.7.2 to 0.7.3

5

lib/parseOne.js

@@ -35,3 +35,6 @@ var Stream = require('stream');

.on('finish',function() {
outStream.end();
if (!found)
outStream.emit('error',new Error('PATTERN_NOT_FOUND'));
else
outStream.end();
});

@@ -38,0 +41,0 @@

2

package.json
{
"name": "unzipper",
"version": "0.7.2",
"version": "0.7.3",
"description": "Unzip cross-platform streaming API ",

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

@@ -15,2 +15,4 @@ 'use strict';

var archive = path.join(__dirname, '../testData/compressed-standard/archive.zip');
test("pipe a single file entry out of a zip", function (t) {

@@ -25,7 +27,14 @@ var writableStream = new streamBuffers.WritableStreamBuffer();

var archive = path.join(__dirname, '../testData/compressed-standard/archive.zip');
fs.createReadStream(archive)
.pipe(unzip.ParseOne('file.txt'))
.pipe(writableStream);
});
test('errors if file is not found', function (t) {
fs.createReadStream(archive)
.pipe(unzip.ParseOne('not_exists'))
.on('error',function(e) {
t.equal(e.message,'PATTERN_NOT_FOUND');
t.end();
});
});
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