ticky.js 281 B

12345678910
  1. var si = typeof setImmediate === 'function', tick;
  2. if (si) {
  3. tick = function (fn) { setImmediate(fn); };
  4. } else if (typeof process !== 'undefined' && process.nextTick) {
  5. tick = process.nextTick;
  6. } else {
  7. tick = function (fn) { setTimeout(fn, 0); };
  8. }
  9. module.exports = tick;