Comparing version 1.1.22 to 1.1.23
@@ -33,2 +33,6 @@ (function () { | ||
rm = function(event, stream, fn) { | ||
stream.removeListener(event, fn); | ||
}, | ||
onWriteError = function(error) { | ||
@@ -73,24 +77,23 @@ writeError = true; | ||
function onResult() { | ||
var is; | ||
if (readError && finish) { | ||
is = true; | ||
write.removeListener('error', onWriteError); | ||
read.removeListener('end', onReadEnd); | ||
rm('error', write, onWriteError); | ||
rm('end', read, onReadEnd); | ||
onEnd(); | ||
} else if (writeError && readError) { | ||
is = true; | ||
read.removeListener('end', onReadEnd); | ||
write.removeListener('finish', onWriteFinish); | ||
rm('end', read, onReadEnd); | ||
rm('finish', write, onWriteFinish); | ||
onEnd(); | ||
} else if (writeError && end) { | ||
is = true; | ||
write.removeListener('finish', onWriteFinish); | ||
read.removeListener('error', onReadError); | ||
rm('finish', write, onWriteFinish); | ||
rm('error', read, onReadError); | ||
onEnd(); | ||
} else if (end || finish) { | ||
is = true; | ||
read.removeListener('error', onReadError); | ||
write.removeListener('error', onWriteError); | ||
rm('error', read, onReadError); | ||
rm('error', write, onWriteError); | ||
onEnd(); | ||
} | ||
if (is) | ||
onEnd(); | ||
} | ||
@@ -97,0 +100,0 @@ |
{ | ||
"name": "pipe-io", | ||
"version": "1.1.22", | ||
"version": "1.1.23", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "Pipe streams and handle events", |
Sorry, the diff of this file is not supported yet
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
9283