You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
841 B

4 years ago
  1. exports.nextTick = function nextTick(fn) {
  2. var args = Array.prototype.slice.call(arguments);
  3. args.shift();
  4. setTimeout(function () {
  5. fn.apply(null, args);
  6. }, 0);
  7. };
  8. exports.platform = exports.arch =
  9. exports.execPath = exports.title = 'browser';
  10. exports.pid = 1;
  11. exports.browser = true;
  12. exports.env = {};
  13. exports.argv = [];
  14. exports.binding = function (name) {
  15. throw new Error('No such module. (Possibly not yet loaded)')
  16. };
  17. (function () {
  18. var cwd = '/';
  19. var path;
  20. exports.cwd = function () { return cwd };
  21. exports.chdir = function (dir) {
  22. if (!path) path = require('path');
  23. cwd = path.resolve(dir, cwd);
  24. };
  25. })();
  26. exports.exit = exports.kill =
  27. exports.umask = exports.dlopen =
  28. exports.uptime = exports.memoryUsage =
  29. exports.uvCounters = function() {};
  30. exports.features = {};