Open jsartisan opened 5 months ago
index.js
export function debounce(func, delay) { let timerId; return function() { const context = this; const args = arguments; clearTimeout(timerId); timerId = setTimeout(function() { func.apply(context, args); }, delay); }; }
index.js