UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

24 lines (22 loc) 623 B
import { AsyncIterableX } from '../asynciterablex'; export class StartWithAsyncIterable extends AsyncIterableX { constructor(source, args) { super(); this._source = source; this._args = args; } async *[Symbol.asyncIterator]() { for (const x of this._args) { yield x; } for await (const item of this._source) { yield item; } } } export function startWith(...args) { return function startWithOperatorFunction(source) { return new StartWithAsyncIterable(source, args); }; } //# sourceMappingURL=startwith.mjs.map