Comparing version 1.2.1 to 1.2.2
13
index.js
@@ -63,2 +63,3 @@ 'use strict' | ||
const _onError = Symbol('onError') | ||
const _sawError = Symbol('sawError') | ||
const _level = Symbol('level') | ||
@@ -123,2 +124,3 @@ const _strategy = Symbol('strategy') | ||
this[_onError] = (err) => { | ||
this[_sawError] = true | ||
// there is no way to cleanly recover. | ||
@@ -157,2 +159,5 @@ // continuing only obscures problems. | ||
params (level, strategy) { | ||
if (this[_sawError]) | ||
return | ||
if (!this[_handle]) | ||
@@ -196,4 +201,6 @@ throw new Error('cannot switch params when binding is closed') | ||
reset () { | ||
assert(this[_handle], 'zlib binding closed') | ||
return this[_handle].reset() | ||
if (!this[_sawError]) { | ||
assert(this[_handle], 'zlib binding closed') | ||
return this[_handle].reset() | ||
} | ||
} | ||
@@ -235,2 +242,4 @@ | ||
if (this[_sawError]) | ||
return | ||
assert(this[_handle], 'zlib binding closed') | ||
@@ -237,0 +246,0 @@ |
{ | ||
"name": "minizlib", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.", | ||
@@ -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
14260
338