most-combine-as-array
v1.0.0
Published
Combine an array of streams as an array
Downloads
6
Readme
@blrrt/most-combine-as-array
combineAsArray(f, arrayOfStreams) -> Stream
Combine an array of streams. Unlike most.combineArray
, this will work on
empty arrays and also return an array (as you'd expect) instead of a list of arguments.
Usage
import _identity from 'lodash/fp/identity';
import { of } from 'most';
const input$ = [
of('foo'),
of('bar'),
of('baz'),
];
const output$ = combineAsArray(_identity, input$);
// ['foo', 'bar', 'baz']
output$.subscribe({
next: x => console.log(x),
});