UNPKG

rxjs

Version:

Reactive Extensions for modern JavaScript

16 lines 734 B
import { operate } from '../util/lift'; import { OperatorSubscriber } from './OperatorSubscriber'; import { innerFrom } from '../observable/innerFrom'; import { noop } from '../util/noop'; export function skipUntil(notifier) { return operate((source, subscriber) => { let taking = false; const skipSubscriber = new OperatorSubscriber(subscriber, () => { skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); taking = true; }, noop); innerFrom(notifier).subscribe(skipSubscriber); source.subscribe(new OperatorSubscriber(subscriber, (value) => taking && subscriber.next(value))); }); } //# sourceMappingURL=skipUntil.js.map