@qvant/qui-max
Version:
A Vue 3 Design system for Web.
17 lines (16 loc) • 350 B
JavaScript
function debounce(fn) {
var pending;
return function() {
if (!pending) {
pending = new Promise(function(resolve) {
Promise.resolve().then(function() {
pending = void 0;
resolve(fn());
});
});
}
return pending;
};
}
export { debounce as default };
//# sourceMappingURL=debounce.js.map