pull-broadcast
Create a broadcast pull-stream
Useful for creating several parallel processing streams for a single event.
Visualization of the process:
|-->-->|
|-->-->|
EVENT -->-->| |-->-->SEVERAL EVENTS
|-->-->|
|-->-->|
pull-broadcast
will pull data from upstream as fast as the fastest substream. Each event will be buffered until it
was consumed by all the substreams.
Before reaching a substream, each event would be cloned, so that a change in one substream, won't affect the objects in other substreams.
Example
var pull = ;var broadcast = ; var events = name: "SomeEvent" value: 0 ; { return { dvalue += num; return d; }}
install
With npm do:
npm install pull-broadcast
license
MIT