semver-resolves

Test whether a semver range resolves

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
semver-resolves
1.1.25 years ago9 years agoMinified + gzip package size for semver-resolves in KB

Readme

semver-resolves Build Status Greenkeeper badge
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