process-browser.js 533 B

12345678910111213141516171819202122232425
  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/no-restricted-syntax
  12. /**
  13. * @param {Function} fn function
  14. */
  15. nextTick(fn) {
  16. // eslint-disable-next-line prefer-rest-params
  17. const args = Array.prototype.slice.call(arguments, 1);
  18. Promise.resolve().then(() => {
  19. // eslint-disable-next-line prefer-spread
  20. fn.apply(null, args);
  21. });
  22. },
  23. };