DEV/DEV4.1/tp3/ex3/modules/helpers.js

12 lines
166 B
JavaScript
Raw Normal View History

2024-03-01 15:39:57 +01:00
function debounce(f,wait)
{
let timeout
return function(...args){
clearTimeout(timeout)
timeout=setTimeout(()=>f(...args),wait)
}
}
export default debounce