node-version-compare
v1.0.3
Published
a node module to compare semver version
Downloads
81,312
Readme
node-version-compare
a node module to compare semver versions
Install
npm install --save node-version-compare
Usage
var compare = require('node-version-compare');
var result = compare('1.0.0', '1.0.1'); // result = -1
result = compare('10.2.0-alpha.1', '10.2.0-alpha.1'); // result = 0
result = compare('10.2.0-beta', '10.2.0-alpha'); // result = 1
result = compare('3.1.1-1', '3.1.1-2'); // result = -1