repeaterjs/repeater

Implement async generator combination functions similar to the ones from rx.js

Closed this issue · 3 comments

  • 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.

Implemented in commits:
c6acfbb
3e741f0
10cbbc9

TODO: fix the type parameters for these methods.
0e4b770

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

Released in 1.0