TenantAtlas/apps/platform/.pnpm-store/v10/files/28/fecdf7cd0bee6869b1f08fbbb51c84281af615a201072c2bdf0d5a2b2ec5e6957598d0fb11dd13cc903ca3e1e3d0860863bc13b29f59cbd72ca475bf4a136d
Ahmed Darrazi 9f74f7a658
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
feat: compress governance operator outcomes
2026-04-19 14:15:11 +02:00

12 lines
464 B
Plaintext

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