is-semver-range
v1.0.0
Published
Determine whether a semver pattern is a range or a single version
Downloads
5
Maintainers
Readme
is-semver-range
Determine whether a semver pattern is a range or a single version
Installation
npm install --save is-semver-range
Summary
is-semver-range
returns true if a version specifier indicates a range of versions and false if it indicates a single version.
var isSemverRange = require('is-semver-range');
isSemverRange('4.0.0'); // false
isSemverRange('=2.3.1'); // false
isSemverRange('0.0.3-rc1'); // false
isSemverRange('>2.0.0'); // true
isSemverRange('>=4 <4.9'); // true
isSemverRange('~0.10.10'); // true
isSemverRange('4 || 5'); // true
isSemverRange('1.x'); // true
isSemverRange('2'); // true
isSemverRange('^3.1.1'); // true
Contributing
Please see the contribution guidelines.