Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

contrib: method to compose multiple reactive sequences #69

Open
getify opened this issue Jul 22, 2015 · 4 comments
Open

contrib: method to compose multiple reactive sequences #69

getify opened this issue Jul 22, 2015 · 4 comments

Comments

@getify
Copy link
Owner

getify commented Jul 22, 2015

var stream1 = ASQ.react(..);

var stream2 = ASQ.react(..);

var stream3 = ASQ.react.????( stream1, stream2 );
@getify
Copy link
Owner Author

getify commented Jul 23, 2015

Reactive Sequence Composition

  • ASQ.react.all(..) (alias zip(..) as with RxJS): sends an event only when there's an event in the buffer from all observed streams
  • ASQ.react.allLatest(..): same as all(..), except buffer size of 1, so only keeps latest message from each stream
  • ASQ.react.latest(..) (alias combineLatest(..) as with RxJS): sends an event whenever any observed stream fires, but always includes the latest from all observed streams
  • ASQ.react.any(..) (alias merge(..) 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 stream
  • ASQ.react.distinctConsecutive(..) (alias distinctUntilChanged(..) as with RxJS): ignores only consecutive duplicate (simple, shallow comparison) event messages from a single stream
  • ASQ.react.filter(..): filter out event messages from a single stream

@staltz
Copy link

staltz commented Sep 20, 2015

Sampling might be missing. See withLatestFrom and sample in RxJS.
Also mergeMap/switchMap/concatMap are all variants of the "asyncMap" type of composition.

@legodude17
Copy link

What is this issue about? Something that should be added?

@getify
Copy link
Owner Author

getify commented Jul 30, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants