Files
meteor/packages/modules/process.js

33 lines
797 B
JavaScript

try {
// The application can run `npm install process` to provide its own
// process stub; otherwise this module will provide a partial stub.
process = global.process || require("process");
} catch (noProcess) {
process = {};
}
if (Meteor.isServer) {
// Make require("process") work on the server in all versions of Node.
meteorInstall({
node_modules: {
"process.js": function (r, e, module) {
module.exports = process;
}
}
});
} else {
process.platform = "browser";
process.nextTick = process.nextTick || Meteor._setImmediate;
}
if (typeof process.env !== "object") {
process.env = {};
}
var hasOwn = Object.prototype.hasOwnProperty;
for (var key in meteorEnv) {
if (hasOwn.call(meteorEnv, key)) {
process.env[key] = meteorEnv[key];
}
}