UNPKG

react-native-a11y

Version:

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

16 lines 542 B
export const debounce = function (callback) { let timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; let timer; // eslint-disable-next-line @typescript-eslint/no-explicit-any return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (timer) { clearTimeout(timer); timer = null; } timer = setTimeout(() => callback(args), timeout); }; }; //# sourceMappingURL=debounce.js.map