end-of-stream
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -42,2 +42,6 @@ var once = require('once'); | ||
var onerror = function(err) { | ||
callback.call(stream, err); | ||
}; | ||
var onclose = function() { | ||
@@ -66,3 +70,3 @@ if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); | ||
stream.on('finish', onfinish); | ||
if (opts.error !== false) stream.on('error', callback); | ||
if (opts.error !== false) stream.on('error', onerror); | ||
stream.on('close', onclose); | ||
@@ -80,3 +84,3 @@ | ||
stream.removeListener('end', onend); | ||
stream.removeListener('error', callback); | ||
stream.removeListener('error', onerror); | ||
stream.removeListener('close', onclose); | ||
@@ -83,0 +87,0 @@ }; |
{ | ||
"name": "end-of-stream", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Call a callback when a readable/writable/duplex stream has completed or failed.", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
5868
69