1.0.2 • Published 9 years ago

vercomp v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

vercomp Build Status

Version Comparison in JavaScript

Inspired by https://fedoraproject.org/wiki/Archive:Tools/RPM/VersionComparison

Usage

var vercomp = require('vercomp')
vercomp('1.0.0', '1.0.1') # return -1
vercomp('10b2', '10a1')   # return 1
vercomp('1', '1')         # return 0

Warning

Release are not condisidered in this algorythm. For example:

vercomp('6.0.rc1', '6.0') # return 1

If you care about the meaning of releases, check https://github.com/Filirom1/smart-vercomp

LICENSE MIT