UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

25 lines (23 loc) 688 B
import { AsyncIterableX } from '../asynciterablex'; export class SkipUntilAsyncIterable extends AsyncIterableX { constructor(source, other) { super(); this._source = source; this._other = other; } async *[Symbol.asyncIterator]() { let otherDone = false; this._other().then(() => (otherDone = true)); for await (const item of this._source) { if (otherDone) { yield item; } } } } export function skipUntil(other) { return function skipUntilOperatorFunction(source) { return new SkipUntilAsyncIterable(source, other); }; } //# sourceMappingURL=skipuntil.mjs.map