kitten-components
Version:
Front-end components library
20 lines (16 loc) • 418 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _arguments = arguments;
var debounce = exports.debounce = function debounce(fn, msDelay) {
var inDebounce = void 0;
return function () {
var context = undefined;
var args = _arguments;
clearTimeout(inDebounce);
inDebounce = setTimeout(function () {
return fn.apply(context, args);
}, msDelay);
};
};