process-browser.js 527 B

1234567891011121314151617181920212223
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. "use strict";
  6. module.exports = {
  7. /**
  8. * @type {Record<string, string>}
  9. */
  10. versions: {},
  11. // eslint-disable-next-line jsdoc/reject-function-type
  12. /** @param {Function} fn function */
  13. nextTick(fn) {
  14. // eslint-disable-next-line prefer-rest-params
  15. const args = Array.prototype.slice.call(arguments, 1);
  16. Promise.resolve().then(() => {
  17. // eslint-disable-next-line prefer-spread
  18. fn.apply(null, args);
  19. });
  20. },
  21. };