combineObj
for xstream
npm install xs-combine-obj
A port of combineLatestObj
to xstream.
Usage
Given these observables:
const a$ = xs;const b$ = xs;const c$ = xs;
Make an observable which is the combination of them, bundled as an object.
; const state$ = ;// or const state$ = combineObj({a: a$, b: b$, c: c$}); state$;// {a: 0, b: 'Boston', c: 'Colorado'}// {a: 1, b: 'Boston', c: 'Colorado'}// {a: 2, b: 'Boston', c: 'Colorado'}
It takes Cycle.js' hungarian notation $
into consideration, returning an object whose keys don't have the $.
The above is more convenient than writing:
var stateAlt$ = xs;
Credit: Code and README example pulled from combineLatestObj