Created
March 7, 2017 08:05
-
-
Save ahy4/93ca92a2f3526b3851c47b9d51887d73 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 clickStream = Rx.Observable.fromEvent(document, "mouseup"); | |
| clickStream | |
| .buffer(clickStream.throttle(250)) | |
| .map(function(x) {return x.length}) | |
| .filter(function(n) {return n >= 2}) | |
| .subscribe(function(n) {console.log(n + "click")}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment