design-react-kit
Version:
Componenti React per Bootstrap 5
15 lines • 430 B
JavaScript
/*
* This work derives from the React Use Navscroll library
* Released under the MIT license by Marco Liberati
* Code: https://github.com/dej611/react-use-navscroll
*/
export const debounce = (callback, wait) => {
let timeoutId;
return (...args) => {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
callback(...args);
}, wait);
};
};
//# sourceMappingURL=debounce.js.map