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.4.0 to 0.4.1

8

lib/PullStream.js

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

// otherwise (i.e. buffer) it is interpreted as a pattern signaling end of stream
PullStream.prototype.stream = function(eof) {
PullStream.prototype.stream = function(eof,includeEof) {
var p = Stream.PassThrough();

@@ -60,2 +60,3 @@ var count = 0,done,packet,self= this;

if (match !== -1) {
if (includeEof) match = match + eof.length;
packet = self.buffer.slice(0,match);

@@ -78,2 +79,3 @@ self.buffer = self.buffer.slice(match);

p.emit('error','FILE_ENDED');
this.__ended = true;
}

@@ -94,3 +96,3 @@ self.next();

PullStream.prototype.pull = function(len) {
PullStream.prototype.pull = function(eof,includeEof) {
var buffer = new Buffer(''),

@@ -106,3 +108,3 @@ self = this;

return new Promise(function(resolve,reject) {
self.stream(len)
self.stream(eof,includeEof)
.pipe(concatStream)

@@ -109,0 +111,0 @@ .on('finish',function() {resolve(buffer);})

{
"name": "unzipper",
"version": "0.4.0",
"version": "0.4.1",
"description": "Unzip cross-platform streaming API ",

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

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