A module based on Isaacs's semver with some differences to suit bower.


A module based on semver with some differences to suit bower.

$ npm install bower-semver

Exactly the same API of semver, check its documentation.

Gives priority to non-prerelease versions:

maxSatisfying(['1.0.0', '1.0.1-rc.1'], '~1.0.0');  // Returns 1.0.0 
maxSatisfying(['1.0.0', '1.1.0-rc.1'], '^1.0.0');  // Returns 1.0.0 
maxSatisfying(['1.0.0', '1.1.0-rc.1'], '*');       // Returns 1.0.0 
maxSatisfying(['0.9.0', '1.0.0-rc.1'], '~1.0.0');  // Returns 1.0.0-rc.1 

Keeps the build if any.

semver.clean('v1.0.0+patch1');  // 1.0.0+patch1 

$ npm test

Released under the MIT License.