Comparing version 1.1.9 to 1.1.10
17
index.js
@@ -14,2 +14,3 @@ 'use strict' | ||
const FLOWING = Symbol('flowing') | ||
const RESUME = Symbol('resume') | ||
@@ -109,3 +110,4 @@ class MiniPass extends EE { | ||
resume () { | ||
// don't let the internal resume be overwritten | ||
[RESUME] () { | ||
this[FLOWING] = true | ||
@@ -118,2 +120,6 @@ if (this.buffer.length) | ||
resume () { | ||
return this[RESUME]() | ||
} | ||
pause () { | ||
@@ -140,4 +146,4 @@ this[FLOWING] = false | ||
this.pipes.push(dest) | ||
dest.on('drain', _ => this.resume()) | ||
this.resume() | ||
dest.on('drain', _ => this[RESUME]()) | ||
this[RESUME]() | ||
return dest | ||
@@ -154,4 +160,5 @@ } | ||
} finally { | ||
if (ev === 'data' && !this.pipes.length && !this.flowing) | ||
this.resume() | ||
if (ev === 'data' && !this.pipes.length && !this.flowing) { | ||
this[RESUME]() | ||
} | ||
} | ||
@@ -158,0 +165,0 @@ } |
{ | ||
"name": "minipass", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "minimal implementation of a PassThrough stream", | ||
@@ -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
146306
879