reka-ui
Version:
Vue port for Radix UI Primitives.
17 lines (14 loc) • 353 B
JavaScript
;
function debounce(callback, durationMs = 10) {
let timeoutId = null;
const callable = (...args) => {
if (timeoutId !== null)
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
callback(...args);
}, durationMs);
};
return callable;
}
exports.debounce = debounce;
//# sourceMappingURL=debounce.cjs.map