I am looking an operator to debounce
a series of event, let us say user\'s click. The input and output should be like this:
interval : ->
According to documentation there are two debounce operators in RxJS. You might be interested in debounceTime
in particular.
debounceTime
From documentation
Emits a value from the source Observable only after a particular time span has passed without another source emission.
Example:
Rx.Observable
.fromEvent(document.querySelector('button'), 'click')
.debounceTime(200)
.mapTo(() => 'clicked!')
.subscribe(v => console.log(v));
It will emit one clicked! if button was clicked in given timespan (200ms in this example).
debounce
From documentation
Emits a value from the source Observable only after a particular time span determined by another Observable has passed without another source emission.