Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (34 sloc) 998 Bytes

Dependency Status devDependency Status NPM version

Node-version

A quick module that returns current node version parsed into parts.

Installation

npm install node-version

Quick Start

var currentVersion = require('node-version');

/*
console.log(currentVersion);

{
    original: 'v0.4.10', // same as process.version
    short: '0.4',
    long: '0.4.10',
    major: '0',
    minor: '4',
    build: '10'
}
*/

Warning

Version 1.0.0 break 0.1.0 since its API changes.

Change

var currentVersion = new (require('../lib/node-version').version);

To

var currentVersion = require('node-version');