muxer
A simple multiplexer utility of RxJS based streams.
Installation
npm install muxer --save
Example
{ const interval$ = O const mod2$ = interval$ const mod3$ = interval$ const mod7$ = interval$ } // Create a single stream that contains events from each of the individual streams const mod$ = const mod2$ rest$ = mod2$rest$
Functions
- mux(sources) ⇒
Observable
- demux(source$, ...keys) ⇒
Array
External
Observable
mux(sources) ⇒ Creates a multiplexed stream from all the input streams
Kind: global function
Returns: Observable
- Multiplexed stream
Param | Type | Description |
---|---|---|
sources | Object |
Dictionary of source streams. |
Array
demux(source$, ...keys) ⇒ De-multiplexes the source stream
Kind: global function
Returns: Array
- Tuple of the selected streams and the rest of them
Param | Type | Description |
---|---|---|
source$ | Observable |
Input multiplexed stream |
...keys | String |
Map of source streams |
Observable
An observable is an interface that provides a generalized mechanism for push-based notification, also known as observer design pattern.
Kind: global external
See: RxJS Observable