install npm

This commit is contained in:
2019-01-29 19:33:51 +01:00
parent b9a54b97a7
commit 5eedee288e
8785 changed files with 817030 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"use strict";
var callable = require("es5-ext/object/valid-callable")
, nextTick = require("next-tick")
, validTimeout = require("./valid-timeout");
var apply = Function.prototype.apply;
module.exports = function (fn/*, timeout*/) {
var delay, timeout = arguments[1];
callable(fn);
if (timeout === undefined) {
delay = nextTick;
} else {
timeout = validTimeout(timeout);
delay = setTimeout;
}
return function () {
return delay(apply.bind(fn, this, arguments), timeout);
};
};