wishthis/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js
2022-04-07 09:06:43 +02:00

21 lines
No EOL
797 B
JavaScript

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