make-semver
v0.1.3
Published
npm tool to parse and convert any number to semantic version
Downloads
2
Readme
make-semver
npm tool to convert any number to semver format
Install
$ npm install make-semver
Usage
var makeSemver = require('make-semver');
// valid input
makeSemver(1) //=> '1.0.0'
makeSemver("1.*") //=> '1.0.0'
makeSemver("v1") //=> '1.0.0'
makeSemver(">=2.5") //=> '2.5.0'
makeSemver("1.2.1-beta.") //=> '1.2.1-beta'
// also will work
makeSemver("4ever") //=> '4.0.0'
// invalid input
makeSemver("") //=> null
makeSemver("text") //=> null