buffer value until x count.
import { interval } from 'rxjs'; import { bufferCount } from 'rxjs/operators'; const interval$ = interval(1000); const buffer$ = interval$.pipe(bufferCount(2));
Official Doc: rxjs.bufferCount