fork-stream
Advanced tools
Comparing version 0.0.3 to 0.0.4
19
index.js
@@ -17,6 +17,15 @@ var stream = require("stream"); | ||
this.a._read = function(n) {}; | ||
this.b._read = function(n) {}; | ||
var self = this; | ||
var self = this; | ||
var resume = function resume() { | ||
if (self.resume) { | ||
var r = self.resume; | ||
self.resume = null; | ||
r.call(null); | ||
} | ||
}; | ||
this.a._read = resume; | ||
this.b._read = resume; | ||
this.on("finish", function() { | ||
@@ -45,6 +54,6 @@ self.a.push(null); | ||
return done(); | ||
} else { | ||
self.resume = done; | ||
} | ||
return out.on("drain", done); | ||
}); | ||
}; |
{ | ||
"name": "fork-stream", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Fork a stream in multiple directions according to a function", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
7783
125