stream-more
Advanced tools
Comparing version 0.0.0-dev.1 to 0.0.0
13
index.js
@@ -24,6 +24,4 @@ 'use strict'; | ||
this._hasPrefinished = false; | ||
// will be emitted if someone .ends() the writable | ||
// side of the More | ||
this.once('prefinish', function () { | ||
this._hasPrefinished = true; | ||
this.once('finish', function () { | ||
this.push(null); | ||
}); | ||
@@ -137,9 +135,2 @@ }; | ||
} | ||
// there is no data to push, and no way of requesting more. | ||
// If this has emitted 'prefinish', then the writable side | ||
// has been ended, and we should push(null) to signal EOF on readable side | ||
if (this._hasPrefinished) { | ||
this.push(null); | ||
} | ||
}; |
{ | ||
"name": "stream-more", | ||
"version": "0.0.0-dev.1", | ||
"version": "0.0.0", | ||
"description": "", | ||
@@ -11,8 +11,5 @@ "main": "index.js", | ||
"license": "ISC", | ||
"browser": { | ||
"readable-stream": "stream" | ||
}, | ||
"dependencies": { | ||
"inherits": "^2.0.1", | ||
"readable-stream": "^1.1.13-1" | ||
"readable-stream": "^1.0.0" | ||
}, | ||
@@ -23,3 +20,3 @@ "devDependencies": { | ||
"sinon": "^1.10.2", | ||
"stream-arrays": "0.0.4", | ||
"stream-arrays": "^0.1.0", | ||
"through2": "^0.5.1", | ||
@@ -26,0 +23,0 @@ "watchify": "^0.10.2" |
@@ -11,3 +11,3 @@ # stream-more | ||
Note: This library is intended to work in both node and the browser. | ||
Note: This library is intended to work in both node and the browser. It also works with both streams2 and streams3. | ||
@@ -14,0 +14,0 @@ ## API |
@@ -14,3 +14,3 @@ var More = require('stream-more'); | ||
var output = new WritableArray(); | ||
var output = new WritableArray([], { objectMode: true }); | ||
output.on('finish', function () { | ||
@@ -17,0 +17,0 @@ assert.equal(onMoreHold.callCount, 2); |
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
9612
186
Updatedreadable-stream@^1.0.0