@@ -20,6 +20,7 @@ semver.clean(' =v1.2.3 ') // '1.2.3'
2020semver.satisfies(' 1.2.3' , ' 1.x || >=2.5.0 || 5.0.0 - 7.2.3' ) // true
2121semver.gt(' 1.2.3' , ' 9.8.7' ) // false
2222semver.lt(' 1.2.3' , ' 9.8.7' ) // true
23+ semver.minVersion(' >=1.0.0' ) // ' 1.0.0'
2324semver.valid(semver.coerce(' v2' )) // ' 2.0.0'
2425semver.valid(semver.coerce(' 42.6.7.9.3-alpha' )) // ' 42.6.7'
2526` ` `
@@ -29,7 +30,7 @@ As a command-line utility:
2930```
3031$ semver -h
3132
32- A JavaScript implementation of the http ://semver.org/ specification
33+ A JavaScript implementation of the https ://semver.org/ specification
3334Copyright Isaac Z. Schlueter
3435
3536Usage: semver [ options] <version > [ <version > [ ...]]
@@ -71,7 +72,7 @@ multiple versions to the utility will just sort them.
7172## Versions
7273
7374A "version" is described by the `v2.0.0` specification found at
74- <http ://semver.org/>.
75+ <https ://semver.org/>.
7576
7677A leading `"="` or `"v"` character is stripped off and ignored.
7778
@@ -137,6 +138,13 @@ the user is indicating that they are aware of the risk. However, it
137138is still not appropriate to assume that they have opted into taking a
138139similar risk on the *next* set of prerelease versions.
139140
141+ Note that this behavior can be suppressed (treating all prerelease
142+ versions as if they were normal versions, for the purpose of range
143+ matching) by setting the `includePrerelease` flag on the options
144+ object to any
145+ [functions](https://github.com/npm/node-semver#functions) that do
146+ range matching.
147+
140148#### Prerelease Identifiers
141149
142150The method `.inc` takes an additional `identifier` string argument that
@@ -325,6 +333,8 @@ strings that they parse.
325333* ` patch(v) ` : Return the patch version number.
326334* ` intersects(r1, r2, loose) ` : Return true if the two supplied ranges
327335 or comparators intersect.
336+ * ` parse(v) ` : Attempt to parse a string as a semantic version, returning either
337+ a ` SemVer ` object or ` null ` .
328338
329339### Comparison
330340
@@ -361,6 +371,8 @@ strings that they parse.
361371 that satisfies the range, or ` null ` if none of them do.
362372* ` minSatisfying(versions, range) ` : Return the lowest version in the list
363373 that satisfies the range, or ` null ` if none of them do.
374+ * ` minVersion(range) ` : Return the lowest version that can possibly match
375+ the given range.
364376* ` gtr(version, range) ` : Return ` true ` if version is greater than all the
365377 versions possible in the range.
366378* ` ltr(version, range) ` : Return ` true ` if version is less than all the
0 commit comments