Created
December 11, 2014 13:14
-
-
Save itzaks/b0da3858bccbf07157d2 to your computer and use it in GitHub Desktop.
tiny coffeescript debounce function
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
| debounce = (timeout, fn, timer = null) -> -> | |
| clearTimeout timer | |
| timer = setTimeout fn, timeout |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example: