multistream
Advanced tools
Comparing version 1.1.0 to 1.2.0
14
index.js
@@ -22,4 +22,4 @@ module.exports = MultiStream | ||
MultiStream.obj = function(streams) { | ||
return new MultiStream(streams, {objectMode:true, highWaterMark:16}) | ||
MultiStream.obj = function (streams) { | ||
return new MultiStream(streams, { objectMode: true, highWaterMark: 16 }) | ||
} | ||
@@ -32,3 +32,3 @@ | ||
MultiStream.prototype._forward = function() { | ||
MultiStream.prototype._forward = function () { | ||
if (this._forwarding || !this._drained) return | ||
@@ -45,7 +45,8 @@ this._forwarding = true | ||
MultiStream.prototype.destroy = function(err) { | ||
MultiStream.prototype.destroy = function (err) { | ||
if (this.destroyed) return | ||
this.destroyed = true | ||
this._queue.forEach(function(stream) { | ||
if (this._current && this._current.destroy) this._current.destroy() | ||
this._queue.forEach(function (stream) { | ||
if (stream.destroy) stream.destroy() | ||
@@ -85,2 +86,3 @@ }) | ||
function onEnd () { | ||
self._current = null | ||
stream.removeListener('readable', onReadable) | ||
@@ -87,0 +89,0 @@ stream.removeListener('end', onEnd) |
{ | ||
"name": "multistream", | ||
"description": "A stream that emits multiple other streams one after another (streams2)", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"author": "Feross Aboukhadijeh <feross@feross.org> (http://feross.org/)", | ||
@@ -6,0 +6,0 @@ "bugs": { |
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
29599
107