download
raw
548 Bytes
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = debounce;
// Corresponds to 10 frames at 60 Hz.
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
function debounce(func, wait = 166) {
let timeout;
function debounced(...args) {
const later = () => {
// @ts-ignore
func.apply(this, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
}
debounced.clear = () => {
clearTimeout(timeout);
};
return debounced;
}

Xet Storage Details

Size:
548 Bytes
·
Xet hash:
452c61ad430742d17a7891c0719e31eee465ca51910f9f30f1563779ed9c9424

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.