Beta (still building)

buffer

Buffer values until other observable notify with emit

Example: buffer until do click

import { fromEvent, interval } from 'rxjs';
import { buffer } from 'rxjs/operators';

const interval$ = interval(1000);
const click$ = fromEvent(document, 'click');
const buffer$ = interval$.pipe(buffer(click$));


Example: buffer until interval emit

import { fromEvent, interval } from 'rxjs';
import { buffer } from 'rxjs/operators';

const interval$ = interval(500);
const interval2$ = interval(1000);
const buffer$ = interval$.pipe(buffer(interval2$));

Official Doc: rxjs.buffer