@@ -20,6 +20,7 @@ semver.clean(' =v1.2.3 ') // '1.2.3'
20
20
semver.satisfies(' 1.2.3' , ' 1.x || >=2.5.0 || 5.0.0 - 7.2.3' ) // true
21
21
semver.gt(' 1.2.3' , ' 9.8.7' ) // false
22
22
semver.lt(' 1.2.3' , ' 9.8.7' ) // true
23
+ semver.minVersion(' >=1.0.0' ) // ' 1.0.0'
23
24
semver.valid(semver.coerce(' v2' )) // ' 2.0.0'
24
25
semver.valid(semver.coerce(' 42.6.7.9.3-alpha' )) // ' 42.6.7'
25
26
` ` `
@@ -29,7 +30,7 @@ As a command-line utility:
29
30
```
30
31
$ semver -h
31
32
32
- A JavaScript implementation of the http ://semver.org/ specification
33
+ A JavaScript implementation of the https ://semver.org/ specification
33
34
Copyright Isaac Z. Schlueter
34
35
35
36
Usage: semver [ options] <version > [ <version > [ ...]]
@@ -71,7 +72,7 @@ multiple versions to the utility will just sort them.
71
72
## Versions
72
73
73
74
A "version" is described by the `v2.0.0` specification found at
74
- <http ://semver.org/>.
75
+ <https ://semver.org/>.
75
76
76
77
A leading `"="` or `"v"` character is stripped off and ignored.
77
78
@@ -137,6 +138,13 @@ the user is indicating that they are aware of the risk. However, it
137
138
is still not appropriate to assume that they have opted into taking a
138
139
similar risk on the *next* set of prerelease versions.
139
140
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
+
140
148
#### Prerelease Identifiers
141
149
142
150
The method `.inc` takes an additional `identifier` string argument that
@@ -325,6 +333,8 @@ strings that they parse.
325
333
* ` patch(v) ` : Return the patch version number.
326
334
* ` intersects(r1, r2, loose) ` : Return true if the two supplied ranges
327
335
or comparators intersect.
336
+ * ` parse(v) ` : Attempt to parse a string as a semantic version, returning either
337
+ a ` SemVer ` object or ` null ` .
328
338
329
339
### Comparison
330
340
@@ -361,6 +371,8 @@ strings that they parse.
361
371
that satisfies the range, or ` null ` if none of them do.
362
372
* ` minSatisfying(versions, range) ` : Return the lowest version in the list
363
373
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.
364
376
* ` gtr(version, range) ` : Return ` true ` if version is greater than all the
365
377
versions possible in the range.
366
378
* ` ltr(version, range) ` : Return ` true ` if version is less than all the
0 commit comments