reka-ui
Version:
Vue port for Radix UI Primitives.
21 lines (19 loc) • 459 B
JavaScript
//#region src/Splitter/utils/debounce.ts
function debounce(callback, durationMs = 10) {
let timeoutId = null;
const callable = (...args) => {
if (timeoutId !== null) clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
callback(...args);
}, durationMs);
};
return callable;
}
//#endregion
Object.defineProperty(exports, 'debounce', {
enumerable: true,
get: function () {
return debounce;
}
});
//# sourceMappingURL=debounce.cjs.map