comparev
v0.1.4
Published
Easily compare versions numbers (semver version)
Downloads
9
Maintainers
Readme
comparev
Easily compare versions numbers (semver version)
Install
NPM
$ npm install comparev
Bower
$ bower install comparev
Usage
Node.js
var comparev = require('comparev');
comparev('0.8.1', '0.8.1') // 0
comparev('1.7.11', '1.13.30') // -1
comparev('0.10.11', '0.9.389') // 1
comparev('1.0.0', '0.99.999') // 1
Browser
<script src="./dist/comparev.js"></script>
<script>
var output = comparev('1.0.0', '0.99.999');
// output: 1
</script>
Testing
npm test
License
MIT, see the LICENSE file for detail.