skipUntil.js 744 B

12345678910111213141516
  1. import { operate } from '../util/lift';
  2. import { createOperatorSubscriber } from './OperatorSubscriber';
  3. import { innerFrom } from '../observable/innerFrom';
  4. import { noop } from '../util/noop';
  5. export function skipUntil(notifier) {
  6. return operate((source, subscriber) => {
  7. let taking = false;
  8. const skipSubscriber = createOperatorSubscriber(subscriber, () => {
  9. skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();
  10. taking = true;
  11. }, noop);
  12. innerFrom(notifier).subscribe(skipSubscriber);
  13. source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value)));
  14. });
  15. }
  16. //# sourceMappingURL=skipUntil.js.map