🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

parallel-multistream

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parallel-multistream

Parallel version of multistream

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
2
Created
Source

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

FAQs

Package last updated on 18 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts