mirror of https://github.com/trezor/trezor-wallet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
208 B
10 lines
208 B
6 years ago
|
export const debounce = (func, wait) => {
|
||
|
let timeout;
|
||
|
return (...args) => {
|
||
|
clearTimeout(timeout);
|
||
|
timeout = setTimeout(() => {
|
||
|
func(...args);
|
||
|
}, wait);
|
||
|
};
|
||
|
};
|