Awesome
<img alt="erre.js" src="https://cdn.rawgit.com/GianlucaGuarini/erre/main/erre-logo.svg" width="50%"/>erre.merge
erre plugin to merge the results multiple streams into one
Installation
npm i erre.merge -S
Usage
import merge from 'erre.merge'
import erre from 'erre'
erre.install('merge', merge)
const stream1 = erre(val => val + 1)
const stream2 = erre(val => val * 2)
const stream = erre.merge(stream1, stream2)
stream.on.value(([val1, val2]) => {
console.log(val1, val2) // 3, 8
})
stream1.push(2)
stream2.push(4)
API
merge
Create a single stream merging multiple erre streams
Parameters
streams
...Generator erre streams generators
Returns Generator a new erre stream generator