immediate.js 363 B

1234567891011121314
  1. /*!
  2. * Centralize this so we can more easily work around issues with people
  3. * stubbing out `process.nextTick()` in tests using sinon:
  4. * https://github.com/sinonjs/lolex#automatically-incrementing-mocked-time
  5. * See gh-6074
  6. */
  7. 'use strict';
  8. const nextTick = process.nextTick.bind(process);
  9. module.exports = function immediate(cb) {
  10. return nextTick(cb);
  11. };