Professional Documents
Culture Documents
Global Objects - Node - Js v12.10.0 Documentation
Global Objects - Node - Js v12.10.0 Documentation
0 Documentation
Global Objects
These objects are available in all modules. The following variables may appear
to be global but are not. They exist only in the scope of modules, see the
module system documentation :
__dirname
__filename
exports
module
require()
The objects listed here are specific to Node.js. There are a number of
built-in objects that are part of the JavaScript language itself, which are
also globally accessible.
Class: Buffer
<Function>
__dirname
This variable may appear to be global but is not. See __dirname .
__filename
This variable may appear to be global but is not. See __filename .
clearImmediate(immediateObject)
clearImmediate is described in the timers section.
clearInterval(intervalObject)
clearInterval is described in the timers section.
file:///C:/Users/Bahiense/AppData/Roaming/npm/node_modules/learnyounode/docs-nodejs/globals.html 1/4
03/08/2021 Global Objects | Node.js v12.10.0 Documentation
clearTimeout(timeoutObject)
clearTimeout is described in the timers section.
console
<Object>
exports
This variable may appear to be global but is not. See exports .
global
<Object> The global namespace object.
In browsers, the top-level scope is the global scope. This means that
within the browser var something will define a new global variable. In
Node.js this is different. The top-level scope is not the global
scope;
var something inside a Node.js module will be local to that module.
module
This variable may appear to be global but is not. See module .
process
<Object>
queueMicrotask(callback)
callback <Function> Function to be queued.
file:///C:/Users/Bahiense/AppData/Roaming/npm/node_modules/learnyounode/docs-nodejs/globals.html 2/4
03/08/2021 Global Objects | Node.js v12.10.0 Documentation
queueMicrotask(() => {
this.emit('load', hit);
});
return;
this._cache.set(url, data);
this.emit('load', data);
};
require()
This variable may appear to be global but is not. See require() .
setImmediate(callback[, ...args])
setImmediate is described in the timers section.
TextDecoder
file:///C:/Users/Bahiense/AppData/Roaming/npm/node_modules/learnyounode/docs-nodejs/globals.html 3/4
03/08/2021 Global Objects | Node.js v12.10.0 Documentation
TextEncoder
The WHATWG TextEncoder class. See the TextEncoder section.
URL
The WHATWG URL class. See the URL section.
URLSearchParams
The WHATWG URLSearchParams class. See the URLSearchParams section.
WebAssembly
<Object>
file:///C:/Users/Bahiense/AppData/Roaming/npm/node_modules/learnyounode/docs-nodejs/globals.html 4/4