Skip to content

Latest commit

 

History

History
 
 

mergeall

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

flyd-mergeall

Flyd module for merging several streams into one.

Graph

a:                {---1---2---3---}
b:                {--1-----2-----3}
mergeAll([a,b]):  {--11---22--3--3}

Signature

[Stream a] -> Stream a

Example

const mergeAll = require('flyd/module/mergeall')

const s1 = flyd.stream()
const s2 = flyd.stream()
const s3 = flyd.stream()
var merged = mergeAll([s1, s2, s3])
s1(1)
merged() // 1
s2(2)
merged() // 2
s3(3)
merged() // 3