mirror of https://github.com/trezor/trezor-wallet
parent
bcd618aa0a
commit
2fd208ddb9
@ -0,0 +1,9 @@
|
||||
export const debounce = (func, wait) => {
|
||||
let timeout;
|
||||
return (...args) => {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
func(...args);
|
||||
}, wait);
|
||||
};
|
||||
};
|
Loading…
Reference in new issue