parallel-multistream

1.0.1 • Public • Published

parallel-multistream

Parallel version of multistream

npm install parallel-multistream

build status

Usage

var parallel = require('parallel-multistream')
 
var stream = parallel([stream1, stream2, stream3])
 
stream.on('data', function(data) {
  // 1st: data will be from stream1
  // 2nd: data will be from stream2
  // 3rd: data will be from stream3
  // 4th: data will be from stream1
  // ...
})
 
stream.on('end', function() {
  // all streams have ended
})

Use stream.destroy() to all sub-streams and emit close.

If you want to add an additional stream you can call stream.add(substream).

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i parallel-multistream

Weekly Downloads

44

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mafintosh
  • maxogden