[go: nahoru, domu]

blob: 9f730e41752c75f0d167ac4354b108637628428e [file] [log] [blame]
"use strict";
/* istanbul ignore next : not testing that setTimeout works */
function nextTick(callback) {
setTimeout(callback, 0);
}
module.exports = function getNextTick(process, setImmediate) {
if (typeof process === "object" && typeof process.nextTick === "function") {
return process.nextTick;
}
if (typeof setImmediate === "function") {
return setImmediate;
}
return nextTick;
};