unichan-merge
merge multiple unichannels into one. supports figuring out which channel fired and giving the value of that channel
Example
let a = Channel()
let b = Channel()
let ab = merge(a, b)
a.put(1)
b.put(2)
var { value, channel } = yield ab()
assert.equal(channel, a)
assert.equal(value, 1)
var { value, channel } = yield ab()
assert.equal(channel, b)
assert.equal(value, 2)
Install
npm install unichan-merge
License
MIT