UNPKG

react-native-a11y

Version:

Improvements of a11y for ReactNative, this library improve work with reader and keyboard focus and reader in general.

12 lines 326 B
export 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); }; }; //# sourceMappingURL=debounce.js.map