Comparing version 0.4.0 to 0.4.1
@@ -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>", |
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
33699
476