3 These object are available in the global scope and can be accessed from anywhere.
7 The global namespace object.
11 The process object. See the `'process object'` section.
15 To require modules. See the `'Modules'` section.
19 Use the internal `require()` machinery to look up the location of a module,
20 but rather than loading the module, just return the resolved filename.
24 An array of search paths for `require()`. This array can be modified to add
27 Example: add a new path to the beginning of the search list
29 require.paths.unshift('/usr/local/node');
34 The filename of the script being executed. This is the absolute path, and not necessarily
35 the same filename passed in as a command line argument.
37 Example: running `node example.js` from `/Users/mjr`
39 console.log(__filename);
40 // /Users/mjr/example.js
44 The dirname of the script being executed.
46 Example: running `node example.js` from `/Users/mjr`
48 console.log(__dirname);
54 A reference to the current module (of type `process.Module`). In particular
55 `module.exports` is the same as the `exports` object. See `src/process.js`