3 These object are available in all modules. Some of these objects aren't
4 actually in the global scope but in the module scope - this will be noted.
8 The global namespace object.
10 In browsers, the top-level scope is the global scope. That means that in
11 browsers if you're in the global scope `var something` will define a global
12 variable. In Node this is different. The top-level scope is not the global
13 scope; `var something` inside a Node module will be local to that module.
17 The process object. See the [process object](process.html#process) section.
21 To require modules. See the [Modules](modules.html#modules) section.
22 `require` isn't actually a global but rather local to each module.
27 Use the internal `require()` machinery to look up the location of a module,
28 but rather than loading the module, just return the resolved filename.
32 An array of search paths for `require()`. This array can be modified to add
35 Example: add a new path to the beginning of the search list
37 require.paths.unshift('/usr/local/node');
42 The filename of the script being executed. This is the absolute path, and not necessarily
43 the same filename passed in as a command line argument.
45 Example: running `node example.js` from `/Users/mjr`
47 console.log(__filename);
48 // /Users/mjr/example.js
50 `__filename` isn't actually a global but rather local to each module.
54 The dirname of the script being executed.
56 Example: running `node example.js` from `/Users/mjr`
58 console.log(__dirname);
61 `__dirname` isn't actually a global but rather local to each module.
66 A reference to the current module. In particular
67 `module.exports` is the same as the `exports` object. See `src/node.js`
70 ### setTimeout(cb, ms)
72 ### setInterval(cb, ms)
75 The timer functions are global variables. See the [timers](timers.html) section.
77 `module` isn't actually a global but rather local to each module.