This commit is contained in:
18
node_modules/licia/nextTick.js
generated
vendored
Normal file
18
node_modules/licia/nextTick.js
generated
vendored
Normal 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;
|
||||
Reference in New Issue
Block a user