$ npm install compare-semver
Compare semver versions to many other semver versions.
npm install compare-semver --save
var compare = require('compare-semver');
var versions = [
'0.0.11',
'0.1.0',
'0.2.0',
'0.1.11'
];
var maxSemver = compare.max(versions);
Returns the greatest version from the list of versions
versions - an array of semantic versionsReturns the smallest version from the list of versions
versions - an array of semantic versionsCompare that single version is greater than all versions in the list
version - the version to compareversions - an array of semantic versionsCompare that single version is less than all versions in the list
version - the version to compareversions - an array of semantic versionsIs the given version unique compared to the list of versions
version - the version to compareversions - an array of semantic versionsnpm install
npm test
© 2010 - cnpmjs.org x YWFE | Home | YWFE