takeUntil.js 497 B

1234567891011
  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 takeUntil(notifier) {
  6. return operate((source, subscriber) => {
  7. innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));
  8. !subscriber.closed && source.subscribe(subscriber);
  9. });
  10. }
  11. //# sourceMappingURL=takeUntil.js.map