Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

debouce with clear debounce function javascript

 const clearDebouncer = (name)=>{
     clearTimeout(global[name]);
     window[name] = undefined;
 }
 const debounceFunction = (func,timer, name)=>{
     clearDebouncer(name)
     window[name] = setTimeout(() => {
     func()
 }, timer);
 }
 
PREVIOUS NEXT
Tagged: #debouce #clear #debounce #function #javascript
ADD COMMENT
Topic
Name
2+2 =