throttleTime

signature: throttleTime(duration: number, scheduler: Scheduler): Observable

Example 1: Receive latest value every 5 seconds
Example 2: Throttle merged observable
  1. import { merge } from 'rxjs/observable/merge';
  2. import { throttleTime, ignoreElements } from 'rxjs/operators';
  3. const source = merge(
  4. //emit every .75 seconds
  5. interval(750),
  6. );
  7. //throttle in middle of emitted values
  8. const example = source.pipe(throttleTime(1200));
  9. //output: 0...1...4...4...8...7

Additional Resources