1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 2× 2× 1× | "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (fn, ms) { return function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } clearTimeout(fn.timeout); fn.timeout = setTimeout(fn.bind.apply(fn, [undefined].concat(args)), ms); return fn.timeout; }; }; |