1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| import { createOperatorSubscriber } from './OperatorSubscriber';
| export function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {
| return (source, subscriber) => {
| let hasState = hasSeed;
| let state = seed;
| let index = 0;
| source.subscribe(createOperatorSubscriber(subscriber, (value) => {
| const i = index++;
| state = hasState
| ?
| accumulator(state, value, i)
| :
| ((hasState = true), value);
| emitOnNext && subscriber.next(state);
| }, emitBeforeComplete &&
| (() => {
| hasState && subscriber.next(state);
| subscriber.complete();
| })));
| };
| }
| //# sourceMappingURL=scanInternals.js.map
|
|