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.
💡 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
debounce 📰 - Official docs
debounce - In Depth Dev Reference
Transformation operator: debounce and debounceTime 🎥 💵 - André Staltz
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/debounce.ts
Last updated