Created
April 25, 2015 20:03
-
-
Save mattpodwysocki/9f852d449c403c1d433f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rawClicks = Rx.Observable.fromEvent(document.querySelector('#btn1'), 'click'); | |
var result = rawClicks.buffer(rawClicks.debounce(500)); | |
result.forEach(function(events) { | |
document.querySelector('#output').innerHTML = events.length + 'x clicks'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment