1.0.0 • Published 9 years ago

random-semver v1.0.0

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

random-semver

Return a random version.

MIT License

build:? coverage:?

Install

$ npm install --save random-semver 

Usage

var randomVersion = require('random-semver');
  
// API
// - randomVersion([options]);
  
// options
// - range
// - preRelease

By default, returns a version like this:

randomVersion();
// => '1.0.1'

Optionally specify range:

randomVersion({ range: '>' });
// => '>3.8.6'

randomVersion({ range: true });
// => '~2.5.1'

Optionally specify preRelease:

randomVersion({ preRelease: '-dev' });
// => '4.8.6-dev'

randomVersion({ preRelease: true });
// => '2.5.1-beta'

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.