![]() |
VOOZH | about |
The process.release property in Node.js provides information about the current Node.js release, including version-related metadata and source URLs. It is mainly used to access details about the Node.js build and release environment during runtime. Its key features are:
Syntax
process.releaseReturn Value: This property returns an object containing the metadata of current release of nodejs.
This object will contain properties like:
node.lib on Windows.Example 1:
Output:
{ name: 'node',
lts: 'Dubnium',
sourceUrl:
'https://nodejs.org/download/release/v10.16.0/node-v10.16.0.tar.gz',
headersUrl:
'https://nodejs.org/download/release/v10.16.0/node-v10.16.0-headers.tar.gz',
libUrl:
'https://nodejs.org/download/release/v10.16.0/win-x64/node.lib' }
Example 2:
Output:
name: node
lts: Dubnium
sourceUrl: https://nodejs.org/download/release/v10.16.0/node-v10.16.0.tar.gz
headersUrl: https://nodejs.org/download/release/v10.16.0/node-v10.16.0-headers.tar.gz
libUrl: https://nodejs.org/download/release/v10.16.0/win-x64/node.lib
Total no of attribute available = 5
Example 3:
Output:
lts: Dubnium
source url: https://nodejs.org/download/release/v10.16.0/node-v10.16.0.tar.gz
header url: https://nodejs.org/download/release/v10.16.0/node-v10.16.0-headers.tar.gz
Note: The above program will compile and run by using the node filename.js command.
Reference:https://nodejs.org/api/process.html#process_process_release