Created
January 27, 2017 13:17
-
-
Save djleonskennedy/a06de5d506affa758a299d85563bdf2a 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
let clicks$ = Rx.Observable.fromEvent(document.getElementById('button'), 'click'); | |
clicks$ | |
.buffer(clicks$.debounce(250)) | |
.map(list => list.length) | |
.filter(x => x === 2) | |
.subscribe(() => { | |
console.log('doubleclick'); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment