initial commit - far from runnable
This commit is contained in:
commit
db057ce342
8614 changed files with 1032171 additions and 0 deletions
22
node_modules/rxjs/dist/esm/internal/operators/scanInternals.js
generated
vendored
Normal file
22
node_modules/rxjs/dist/esm/internal/operators/scanInternals.js
generated
vendored
Normal file
|
|
@ -0,0 +1,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
|
||||
Loading…
Add table
Add a link
Reference in a new issue