ternary-stream
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -32,6 +32,8 @@ 'use strict'; | ||
// if condition is false | ||
// pipe input to falseStream | ||
// pipe input to falseStream | ||
forkStream.b.pipe(falseStream); | ||
// merge output with trueStream's output | ||
mergedStream = mergeStream(falseStream, trueStream); | ||
// redirect falseStream errors to mergedStream | ||
falseStream.on('error', function(err) { mergedStream.emit('error', err); }); | ||
} else { | ||
@@ -44,4 +46,9 @@ // if there's no 'else' condition | ||
// redirect trueStream errors to mergedStream | ||
trueStream.on('error', function(err) { mergedStream.emit('error', err); }); | ||
// send everything down-stream | ||
mergedStream.pipe(outStream); | ||
// redirect mergedStream errors to outStream | ||
mergedStream.on('error', function(err) { outStream.emit('error', err); }); | ||
@@ -48,0 +55,0 @@ // consumers write in to forkStream, we write out to outStream |
{ | ||
"name": "ternary-stream", | ||
"description": "Fork stream based on passed condition, and collect down-stream", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"homepage": "https://github.com/robrich/ternary-stream", | ||
@@ -22,5 +22,5 @@ "repository": "git://github.com/robrich/ternary-stream.git", | ||
"devDependencies": { | ||
"jshint": "^2.5.6", | ||
"mocha": "^2.0.0", | ||
"should": "^4.1.0" | ||
"jshint": "^2.5.10", | ||
"mocha": "^2.0.1", | ||
"should": "^4.2.1" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
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
28425
45