multistream-merge
v0.2.0
Published
Merge multiple streams into one (using through2 and hence Streams2)
Downloads
12
Maintainers
Readme
multistream-merge
Merge multiple streams into one, using Streams2.
The order of the emitted chunks/objects is random in the sense that this module does not enforce any ordering on the emitted data.
Install
Install with npm.
npm install multistream-merge
Examples
Buffer mode
var multistreamMerge = require('multistream-merge');
multistreamMerge(childProcess.stdout, childProcess.stderr)
.pipe(fs.createWriteStream('output.log'));
Object mode
var gulp = require('gulp');
var multistreamMerge = require('multistream-merge');
multistreamMerge.obj(gulp.src('assets/**'), gulp.src('src/**'))
.pipe(gulp.dest('out/'));
Documentation
multistreamMerge([options], readableStreams)
options
Type: Object
Available options:
objectMode
:false
. Set the objectMode options for the merge stream.
readableStreams
Type: ...ReadableStream
| ReadableStream[]
The input streams to merge
multistreamMerge.obj(readableStreams)
Convenience method to create a merge stream with object mode enabled.
License
MIT @ Mario Casciaro