This commit is contained in:
Your Name
2026-08-11 17:41:36 +08:00
parent cfe4c82c90
commit 03fe4ddf9d
18771 changed files with 3617239 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
if (typeof process === 'object' && process.nextTick && !false) {
exports = process.nextTick;
} else if (typeof setImmediate === 'function') {
exports = function(cb) {
setImmediate(ensureCallable(cb));
};
} else {
exports = function(cb) {
setTimeout(ensureCallable(cb), 0);
};
}
function ensureCallable(fn) {
if (typeof fn !== 'function')
throw new TypeError(fn + ' is not a function');
return fn;
}
module.exports = exports;