react-native-a11y
Version:
Improvements of a11y for ReactNative, this library improve work with reader and keyboard focus and reader in general.
19 lines (18 loc) • 455 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.debounce = void 0;
const debounce = (callback, timeout = 100) => {
let timer;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (...args) => {
if (timer) {
clearTimeout(timer);
timer = null;
}
timer = setTimeout(() => callback(args), timeout);
};
};
exports.debounce = debounce;
//# sourceMappingURL=debounce.js.map
;