stream-combiner2
Advanced tools
Comparing version 1.0.2 to 1.1.0
12
index.js
@@ -0,3 +1,4 @@ | ||
var PassThrough = require('readable-stream').PassThrough | ||
var Readable = require('readable-stream').Readable | ||
var duplexer = require('duplexer2') | ||
var through = require('through2') | ||
@@ -31,3 +32,3 @@ module.exports = function () { | ||
if(streams.length == 0) | ||
return through(opts) | ||
return new PassThrough(opts) | ||
else if(streams.length == 1) | ||
@@ -67,8 +68,3 @@ return streams[0] | ||
if (typeof tr.read === 'function') return tr | ||
if (!opts) opts = tr._options || {} | ||
var input = through(opts), output = through(opts) | ||
input.pipe(tr).pipe(output) | ||
var dup = duplexer(input, output) | ||
tr.on('error', function (err) { dup.emit('error', err) }); | ||
return dup; | ||
return new Readable(opts).wrap(tr) | ||
} |
{ | ||
"name": "stream-combiner2", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"homepage": "https://github.com/substack/stream-combiner2", | ||
@@ -10,8 +10,8 @@ "repository": { | ||
"dependencies": { | ||
"duplexer2": "~0.0.2", | ||
"through2": "~0.5.1" | ||
"duplexer2": "~0.1.0", | ||
"readable-stream": "^2.0.2" | ||
}, | ||
"devDependencies": { | ||
"tape": "~2.3.0", | ||
"through": "~2.3.4", | ||
"through2": "^2.0.0", | ||
"event-stream": "~3.0.7" | ||
@@ -18,0 +18,0 @@ }, |
@@ -5,3 +5,3 @@ # stream-combiner2 | ||
[stream-combiner](https://npmjs.org/package/stream-combiner) | ||
for streams2. | ||
for streams3. | ||
@@ -17,3 +17,3 @@ ``` js | ||
Streams1 streams are automatically upgraded to be streams2 streams. | ||
Streams1 streams are automatically upgraded to be streams3 streams. | ||
@@ -20,0 +20,0 @@ Listening for 'error' will recieve errors from all streams inside the pipe. |
Sorry, the diff of this file is not supported yet
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
6431
133
+ Addedreadable-stream@^2.0.2
+ Addedduplexer2@0.1.4(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedthrough2@~0.5.1
- Removedduplexer2@0.0.2(transitive)
- Removedisarray@0.0.1(transitive)
- Removedreadable-stream@1.0.341.1.14(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedthrough2@0.5.1(transitive)
- Removedxtend@3.0.0(transitive)
Updatedduplexer2@~0.1.0