UNPKG

timing-provider

Version:

An implementation of the timing provider specification.

9 lines 421 B
import { filter, scan } from 'rxjs'; const INITIAL_VALUE = Symbol(); export const combineAsTuple = () => (source) => source.pipe(scan((lastValue, [index, value]) => { if (index === 0) { return [value, lastValue[1]]; } return [lastValue[0], value]; }, [INITIAL_VALUE, INITIAL_VALUE]), filter((tuple) => tuple.every((element) => element !== INITIAL_VALUE))); //# sourceMappingURL=combine-as-tuple.js.map