Beta (still building)


auditTime operator returns the most recent emit value during the indicated period

Example: auditTime

import { timer } from 'rxjs';
import { auditTime, take } from 'rxjs/operators';

const source$ = timer(0, 1500).pipe(take(10));
const result$ = source$.pipe(auditTime(2500));

Example: auditTime with click event

Click the page to emit events

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

const source$ = fromEvent(document, 'click');
const result$ = source$.pipe(auditTime(1000));

Official Doc: rxjs.auditTime