UNPKG

@trufactor/core

Version:

Customer Demographics, Heatmap, Routes and more.

13 lines (10 loc) 230 B
export function debounce(fn,delay){ let timerId; return function(...args){ if(timerId) clearTimeout(timerId); timerId = setTimeout(()=>{ fn(...args); timerId = null; }, delay); } } //end debounce()