asynquence
asynquence copied to clipboard
contrib: method to compose multiple reactive sequences
var stream1 = ASQ.react(..);
var stream2 = ASQ.react(..);
var stream3 = ASQ.react.????( stream1, stream2 );
Reactive Sequence Composition
ASQ.react.all(..)(aliaszip(..)as with RxJS): sends an event only when there's an event in the buffer from all observed streamsASQ.react.allLatest(..): same asall(..), except buffer size of 1, so only keeps latest message from each streamASQ.react.latest(..)(aliascombineLatest(..)as with RxJS): sends an event whenever any observed stream fires, but always includes the latest from all observed streamsASQ.react.any(..)(aliasmerge(..)as with RxJS): merging/collating events from multiple streams into one stream (no buffering, no waiting)
Reactive Sequence Transform
ASQ.react.distinct(..): ignores all duplicate (simple, shallow comparison) event messages from a single streamASQ.react.distinctConsecutive(..)(aliasdistinctUntilChanged(..)as with RxJS): ignores only consecutive duplicate (simple, shallow comparison) event messages from a single streamASQ.react.filter(..): filter out event messages from a single stream
Sampling might be missing. See withLatestFrom and sample in RxJS. Also mergeMap/switchMap/concatMap are all variants of the "asyncMap" type of composition.
What is this issue about? Something that should be added?
This is an ongoing tracking issue about me adding more reactive-sequences support. some of the code has been released, but i have an an outstanding set of work to rearrange it that has not yet been pushed.