1.0.0 • Published 9 years ago
random-semver v1.0.0
random-semver
Return a random version.
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
- random-uuid - Return a random uuid.
- random-identity - Return a random ID.
- random-dx - Return a value equal to the roll of a die.
- random-hexhash - Return a random hex hash.
- random-normal - Return a normally-distributed random variate.
- random-rpg - Return an array of dice values.
random-file - Return a random file name with random extension.
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.