1.0.0 • Published 7 years ago

most-combine-as-array v1.0.0

Weekly downloads
1
License
Unlicense
Repository
github
Last release
7 years ago

@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),
});