vue-admin-core
Version:
A Component Library for Vue 3
20 lines (16 loc) • 356 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
function limit(fn, timespan) {
let pending = false;
return (...args) => {
if (pending)
return;
pending = true;
fn(...args);
setTimeout(() => {
pending = false;
}, timespan);
};
}
exports.default = limit;
//# sourceMappingURL=limit.js.map