Created
May 23, 2019 00:33
-
-
Save rockydd/8a6d82709d56380c4b08ff759d8431c0 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
import { fromEvent, interval } from 'rxjs'; | |
import { throttle } from 'rxjs/operators'; | |
const clicks = fromEvent(document, 'click'); | |
//const result = clicks.pipe(throttle(ev => interval(1000))); | |
const result = interval(2000).pipe(throttle( i => clicks)); | |
result.subscribe(x => console.log(x)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment