UNPKG

mini-debounce

Version:

Extremely small and modern debounce library (smaller than tiny-debounce)

2 lines (1 loc) 190 B
exports.debounce=function(e,n){var r;return function(){for(var t=[],o=arguments.length;o--;)t[o]=arguments[o];return clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,t)},n)}};