Last active
May 20, 2021 15:40
-
-
Save MauricioRobayo/2331d016e7fd716135593e18898fb001 to your computer and use it in GitHub Desktop.
#gogofast
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
const debounce = (func, delay) => { | |
let timeout = null; | |
return (...args) => { | |
clearTimeout(timeout); | |
timeout = setTimeout(() => { | |
func.apply(this, args); | |
}, delay); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment