promise-readable
Advanced tools
Comparing version 3.1.1 to 3.1.2
# Changelog | ||
## v3.1.2 2018-02-05 | ||
* Can call `destroy` twice. | ||
## v3.1.1 2018-02-04 | ||
@@ -4,0 +8,0 @@ |
@@ -193,8 +193,12 @@ 'use strict' | ||
destroy () { | ||
this.stream.removeListener('error', this._errorHandler) | ||
delete this._errorHandler | ||
if (typeof this.stream.destroy === 'function') { | ||
this.stream.destroy() | ||
if (this._errorHandler) { | ||
this.stream.removeListener('error', this._errorHandler) | ||
delete this._errorHandler | ||
} | ||
delete this.stream | ||
if (this.stream) { | ||
if (typeof this.stream.destroy === 'function') { | ||
this.stream.destroy() | ||
} | ||
delete this.stream | ||
} | ||
} | ||
@@ -201,0 +205,0 @@ } |
{ | ||
"name": "promise-readable", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Return promise for readable stream", | ||
@@ -5,0 +5,0 @@ "main": "lib/promise-readable.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
15216
197