.
This commit is contained in:
12
node_modules/rxjs/dist/esm/internal/operators/switchScan.js
generated
vendored
Normal file
12
node_modules/rxjs/dist/esm/internal/operators/switchScan.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { switchMap } from './switchMap';
|
||||
import { operate } from '../util/lift';
|
||||
export function switchScan(accumulator, seed) {
|
||||
return operate((source, subscriber) => {
|
||||
let state = seed;
|
||||
switchMap((value, index) => accumulator(state, value, index), (_, innerValue) => ((state = innerValue), innerValue))(source).subscribe(subscriber);
|
||||
return () => {
|
||||
state = null;
|
||||
};
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=switchScan.js.map
|
||||
Reference in New Issue
Block a user