interleave-stream
Interleave multiple input streams into a single stream
Will emit chunks from input streams in order, e.g. [s1chunk1, s2chunk1, s3chunk1, s1chunk2, s2chunk2, etc..]
. Use split or block-stream2 in order to control chunks from input streams.
Install
npm install -S interleave-stream
Usage
var interleave = var split = var s1 = var s2 = s1s2 // outputs `1A2B3C` to stdout
API
var interleave =
interleave(streams, opts)
Where:
streams
is an array of readable streamsopts
is the same as the options for ReadableStream
Returns a ReadableStream that interleaves chunks from input streams in order.
interleave.obj(streams, opts)
For objectMode streams.
Contribute
PRs accepted.
Small note: If editing the Readme, please conform to the standard-readme specification.
License
MIT © Gregor MacLennan