1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-07-14 02:28:21 +00:00
trezor-wallet/src/utils/common.js
2019-04-15 17:31:36 +02:00

10 lines
208 B
JavaScript

export const debounce = (func, wait) => {
let timeout;
return (...args) => {
clearTimeout(timeout);
timeout = setTimeout(() => {
func(...args);
}, wait);
};
};