UNPKG

rxjs

Version:

Reactive Extensions for modern JavaScript

21 lines 811 B
import { operate } from '../util/lift'; import { innerFrom } from '../observable/innerFrom'; import { OperatorSubscriber } from './OperatorSubscriber'; export function exhaustAll() { return operate(function (source, subscriber) { var isComplete = false; var innerSub = null; source.subscribe(new OperatorSubscriber(subscriber, function (inner) { if (!innerSub) { innerSub = innerFrom(inner).subscribe(new OperatorSubscriber(subscriber, undefined, function () { innerSub = null; isComplete && subscriber.complete(); })); } }, function () { isComplete = true; !innerSub && subscriber.complete(); })); }); } //# sourceMappingURL=exhaustAll.js.map