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 Used to print to stdout and stderr. See the [stdio](stdio.html) section.
25 Used to handle binary data. See the [buffers](buffers.html) section.
29 To require modules. See the [Modules](modules.html#modules) section.
30 `require` isn't actually a global but rather local to each module.
35 Use the internal `require()` machinery to look up the location of a module,
36 but rather than loading the module, just return the resolved filename.
40 Modules are cached in this object when they are required. By deleting a key
41 value from this object, the next `require` will reload the module.
46 An array of search paths for `require()`. This array can be modified to add
49 Example: add a new path to the beginning of the search list
51 require.paths.unshift('/usr/local/node');
56 The filename of the script being executed. This is the absolute path, and not necessarily
57 the same filename passed in as a command line argument.
59 Example: running `node example.js` from `/Users/mjr`
61 console.log(__filename);
62 // /Users/mjr/example.js
64 `__filename` isn't actually a global but rather local to each module.
68 The dirname of the script being executed.
70 Example: running `node example.js` from `/Users/mjr`
72 console.log(__dirname);
75 `__dirname` isn't actually a global but rather local to each module.
80 A reference to the current module. In particular
81 `module.exports` is the same as the `exports` object. See `src/node.js`
83 `module` isn't actually a global but rather local to each module.
88 An object which is shared between all instances of the current module and
89 made accessible through `require()`.
90 `exports` is the same as the `module.exports` object. See `src/node.js`
92 `exports` isn't actually a global but rather local to each module.
94 ### setTimeout(cb, ms)
96 ### setInterval(cb, ms)
99 The timer functions are global variables. See the [timers](timers.html) section.