debounce
signature: debounce(durationSelector: function): Observable
debounce(durationSelector: function): Observable
Discard emitted values that take less than the specified time, based on selector function, between output.
:bulb: Though not as widely used as debounceTime, debounce is important when the debounce rate is variable!
Examples
Example 1: Debounce on timer
( StackBlitz | jsBin | jsFiddle )
Example 2: Debounce at increasing interval
( StackBlitz | jsBin | jsFiddle )
Additional Resources
:newspaper: - Official docs
Transformation operator: debounce and debounceTime
:video_camera: :dollar: - André Staltz
:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/debounce.ts
Last updated