1 |
3a515b92
|
cagy
|
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 |
|
|
|
9 |
|
|
exports.platform = exports.arch =
|
10 |
|
|
exports.execPath = exports.title = 'browser';
|
11 |
|
|
exports.pid = 1;
|
12 |
|
|
exports.browser = true;
|
13 |
|
|
exports.env = {};
|
14 |
|
|
exports.argv = [];
|
15 |
|
|
|
16 |
|
|
exports.binding = function (name) {
|
17 |
|
|
throw new Error('No such module. (Possibly not yet loaded)')
|
18 |
|
|
};
|
19 |
|
|
|
20 |
|
|
(function () {
|
21 |
|
|
var cwd = '/';
|
22 |
|
|
var path;
|
23 |
|
|
exports.cwd = function () { return cwd };
|
24 |
|
|
exports.chdir = function (dir) {
|
25 |
|
|
if (!path) path = require('path');
|
26 |
|
|
cwd = path.resolve(dir, cwd);
|
27 |
|
|
};
|
28 |
|
|
})();
|
29 |
|
|
|
30 |
|
|
exports.exit = exports.kill =
|
31 |
|
|
exports.umask = exports.dlopen =
|
32 |
|
|
exports.uptime = exports.memoryUsage =
|
33 |
|
|
exports.uvCounters = function() {};
|
34 |
|
|
exports.features = {};
|