semver
Advanced tools
Comparing version 7.1.3 to 7.2.0
@@ -46,2 +46,3 @@ // just pre-load all the stuff that index.js lazily exports | ||
intersects: require('./ranges/intersects'), | ||
simplifyRange: require('./ranges/simplify'), | ||
} |
{ | ||
"name": "semver", | ||
"version": "7.1.3", | ||
"version": "7.2.0", | ||
"description": "The semantic version parser used by npm.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -81,2 +81,3 @@ semver(1) -- The semantic versioner for npm | ||
const semverIntersects = require('semver/ranges/intersects') | ||
const simplifyRange = require('semver/ranges/simplify') | ||
``` | ||
@@ -450,2 +451,10 @@ | ||
* `intersects(range)`: Return true if any of the ranges comparators intersect | ||
* `simplifyRange(versions, range)`: Return a "simplified" range that | ||
matches the same items in `versions` list as the range specified. Note | ||
that it does *not* guarantee that it would match the same versions in all | ||
cases, only for the set of versions provided. This is useful when | ||
generating ranges by joining together multiple versions with `||` | ||
programmatically, to provide the user with something a bit more | ||
ergonomic. If the provided range is shorter in string-length than the | ||
generated range, then that is returned. | ||
@@ -452,0 +461,0 @@ Note that, since ranges may be non-contiguous, a version might not be |
97872
51
1614
564