does it feel that the definition of throttling in js elevation is different from that in blogs? I feel that this definition is like anti-shaking, which is similar to the debounce method in underscore, and I prefer to think that this idea is called anti-shaking. Please correct the boss.
this is the definition and code for throttling in elevation
//
function debounce(fn, delay){
let timer = null;
return function() {
let context = this;
let args = arguments;
clearTimeout(timer);
timer = setTimeout(function(){
fn.apply(context, args);
}, delay)
}
}