Beta (still building)

bufferTime

buffer value until X time

Example: with interval

import { interval } from 'rxjs';
import { bufferTime } from 'rxjs/operators';

const interval$ = interval(1000);
const buffer$ = interval$.pipe(bufferTime(2000));


Example: with mouse click

import { fromEvent } from 'rxjs';
import { bufferTime } from 'rxjs/operators';

const click$ = fromEvent(document, 'click');
const buffer$ = click$.pipe(bufferTime(2000));

Official Doc: rxjs.bufferTime