mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-14 02:28:21 +00:00
10 lines
208 B
JavaScript
10 lines
208 B
JavaScript
export const debounce = (func, wait) => {
|
|
let timeout;
|
|
return (...args) => {
|
|
clearTimeout(timeout);
|
|
timeout = setTimeout(() => {
|
|
func(...args);
|
|
}, wait);
|
|
};
|
|
};
|