Get your environment's active version of node.
$ npm install --save node-ver
Get the full version as a string
, and the major, minor, patch as a number
.
const version = require('node-ver');
version().full;
//=> '4.2.6'
version().major;
//=> 4
version().minor;
//=> 2
version().patch;
//=> 6
MIT © Michael Wuergler