* Creates a debounced function that delays invoking func until after wait * milliseconds have elapsed since the last time the debounced function was invoked. * * Notably, invokes the function both the leading and trailing edges of the event. * * @param {function(...S):T} func * @param {number}
(func, wait)
| 13 | * @template T |
| 14 | */ |
| 15 | function debounce(func, wait) { |
| 16 | return lodashDebounce(func, wait, {leading: true, trailing: true}); |
| 17 | } |
| 18 | |
| 19 | module.exports = debounce; |
no outgoing calls
no test coverage detected