Skip to content

Instantly share code, notes, and snippets.

@superburrito superburrito/debounce.js
Last active Sep 2, 2019

What would you like to do?
function debounce(func, wait) {
let timeoutId;
return (...args) => {
timeoutId = setTimeout(() => {
}, wait);

This comment has been minimized.

Copy link

degamer106 commented Sep 2, 2019

Is it a better idea to use a function declaraton on line 3 in case you have to debounce an object's method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.