semver-resolves
v1.1.2
Published
Test whether a semver range resolves
Downloads
240
Readme
semver-resolves
Test whether a semver range can possibly be satisfied
Install
$ npm install --save semver-resolves
Usage
var resolves = require('semver-resolves')
resolves.range('>2 <4') // => true
resolves.range('<2 >4') // => false
semver-resolves determines whether the given range can be satisfied by at least one valid version.
API
resolves.range(range)
-> boolean
range
Required
Type: string
The semver range to test.
resolves.comparators(comparators)
-> boolean
comparators
Required
Type: array[comparator]
An array of semver.Comparator
instances to check.
resolves.range
will allow any range with at least one comparator set that resolves. You can use resolves.comparator
to check individual sets independently.
License
MIT © Ben Drucker