Created
July 3, 2014 19:25
-
-
Save jasonmoo/83e2f110e9c3a99d4181 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
function mitigated_event(f, t) { | |
var timeout; | |
return function(e) { | |
clearTimeout(timeout); | |
timeout = setTimeout(function() { f(e); }, t); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment