stream-demux
Advanced tools
Comparing version 1.3.1 to 1.4.0
16
index.js
@@ -18,12 +18,12 @@ const AsyncIterableStream = require('async-iterable-stream'); | ||
end(name) { | ||
if (name === undefined) { | ||
this.mainStream.end(); | ||
} else { | ||
this.mainStream.write({ | ||
name, | ||
data: END_SYMBOL | ||
}); | ||
} | ||
this.mainStream.write({ | ||
name, | ||
data: END_SYMBOL | ||
}); | ||
} | ||
endAll() { | ||
this.mainStream.end(); | ||
} | ||
async *createDemuxedStream(stream, name) { | ||
@@ -30,0 +30,0 @@ for await (let packet of stream) { |
{ | ||
"name": "stream-demux", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "An iterable asynchronous stream demultiplexer.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -110,3 +110,3 @@ const assert = require('assert'); | ||
it('should support ending all streams using a single command', async () => { | ||
it('should support ending all streams using a single endAll command', async () => { | ||
(async () => { | ||
@@ -118,3 +118,3 @@ for (let i = 0; i < 10; i++) { | ||
} | ||
demux.end(); | ||
demux.endAll(); | ||
})(); | ||
@@ -121,0 +121,0 @@ |
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
9414
191