(func: (...args: any[]) => void, wait = 0)
| 346 | }; |
| 347 | |
| 348 | export const debounce = (func: (...args: any[]) => void, wait = 0) => { |
| 349 | let timer: any; |
| 350 | return (...args: any[]): any => { |
| 351 | clearTimeout(timer); |
| 352 | timer = setTimeout(func, wait, ...args); |
| 353 | }; |
| 354 | }; |
| 355 | |
| 356 | /** |
| 357 | * Check whether the two string maps are shallow equal. |
no outgoing calls
no test coverage detected