time-to-botec/js/node_modules/@stdlib/process/node-version
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00
..
bin feat: add the node modules 2022-12-03 12:44:49 +00:00
docs feat: add the node modules 2022-12-03 12:44:49 +00:00
etc feat: add the node modules 2022-12-03 12:44:49 +00:00
lib feat: add the node modules 2022-12-03 12:44:49 +00:00
package.json feat: add the node modules 2022-12-03 12:44:49 +00:00
README.md feat: add the node modules 2022-12-03 12:44:49 +00:00

Node Version

Node version.

Usage

var NODE_VERSION = require( '@stdlib/process/node-version' );

NODE_VERSION

Node version.

console.log( NODE_VERSION );
// => <string>

Notes

  • In browser environments and environments other than Node.js the Node version is equal to null.

Examples

var semver = require( 'semver' );
var NODE_VERSION = require( '@stdlib/process/node-version' );

if ( semver.lt( NODE_VERSION, '1.0.0' ) ) {
    console.log( 'Running on a pre-io.js version...' );
}
else if ( semver.lt( NODE_VERSION, '4.0.0' ) ) {
    console.log( 'Running on an io.js version...' );
}
else {
    console.log( 'Running on a post-io.js version...' );
}

CLI

Usage

Usage: node-version [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ node-version
<node_version>