Implement async generator combination functions similar to the ones from rx.js
Closed this issue · 3 comments
brainkim commented
- implement
Channel.race
- implement
Channel.merge
- implement
Channel.zip
- implement
Channel.latest
- add variadic type parameters for these methods
- write tests
- test throwing behavior
- add documentation
Channel.race
calls Promise.race
on each iteration, Channel.merge
merges all async iterators into a single iterator, Channel.zip
calls Promise.all
on each iteration, and Channel.latest
returns an iterator which iterates with the latest values when any individual iterator updates.
brainkim commented
brainkim commented
TODO: Rename Channel.all
to Channel.zip
because all
implies that all iterators are run to completion when in actuality the iterator returns when any child iterators return.
d8bb3a5
brainkim commented
Released in 1.0