Beta (still building)

partition

partition operator split the observable to Two new observables. ⚠️ always return 2 new operators

Example: normal use of partition operator

import { of, partition, interval } from 'rxjs';

const interval$ = interval(2000);
const [part1$, part2$] = partition(interval$, i => i % 2);

Example: partition operator can't split to 3 observables

import { of, partition, interval } from 'rxjs';

const interval$ = interval(2000);
const [part1$, part2$, part3$] = partition(interval$, i => i % 3);

Official Doc: rxjs.partition