diff options
Diffstat (limited to 'deps/npm/html/doc/semver.html')
-rw-r--r-- | deps/npm/html/doc/semver.html | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/deps/npm/html/doc/semver.html b/deps/npm/html/doc/semver.html index cd9ee97930..46bce35f05 100644 --- a/deps/npm/html/doc/semver.html +++ b/deps/npm/html/doc/semver.html @@ -18,12 +18,12 @@ <pre><code>$ npm install semver -semver.valid('1.2.3') // true -semver.valid('a.b.c') // false -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true</code></pre> +semver.valid('1.2.3') // true +semver.valid('a.b.c') // false +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true</code></pre> <p>As a command-line utility:</p> @@ -52,7 +52,7 @@ multiple versions to the utility will just sort them.</code></pre> <ul><li>a number (Major)</li><li>a period</li><li>a number (minor)</li><li>a period</li><li>a number (patch)</li><li>OPTIONAL: a hyphen, followed by a number (build)</li><li>OPTIONAL: a collection of pretty much any non-whitespace characters (tag)</li></ul> -<p>A leading <code>"="</code> or <code>"v"</code> character is stripped off and ignored.</p> +<p>A leading <code>"="</code> or <code>"v"</code> character is stripped off and ignored.</p> <h2 id="Comparisons">Comparisons</h2> @@ -67,7 +67,7 @@ build number. <code>2.3.4-0 > 2.3.4</code></li><li>If they both have build n different, then take the one with the bigger build number. <code>2.3.4-10 > 2.3.4-9</code></li><li>If only one of them has a tag, then take the one without the tag. <code>2.3.4 > 2.3.4-beta</code></li><li>If they both have tags, then take the one with the lexicographically -larger tag. <code>2.3.4-beta > 2.3.4-alpha</code></li><li>At this point, they're equal.</li></ul> +larger tag. <code>2.3.4-beta > 2.3.4-alpha</code></li><li>At this point, they're equal.</li></ul> <h2 id="Ranges">Ranges</h2> @@ -75,20 +75,20 @@ larger tag. <code>2.3.4-beta > 2.3.4-alpha</code></li><li>At this point, the <ul><li><code>>1.2.3</code> Greater than a specific version.</li><li><code><1.2.3</code> Less than</li><li><code>1.2.3 - 2.3.4</code> := <code>>=1.2.3 <=2.3.4</code></li><li><code>~1.2.3</code> := <code>>=1.2.3 <1.3.0</code></li><li><code>~1.2</code> := <code>>=1.2.0 <2.0.0</code></li><li><code>~1</code> := <code>>=1.0.0 <2.0.0</code></li><li><code>1.2.x</code> := <code>>=1.2.0 <1.3.0</code></li><li><code>1.x</code> := <code>>=1.0.0 <2.0.0</code></li></ul> -<p>Ranges can be joined with either a space (which implies "and") or a -<code>||</code> (which implies "or").</p> +<p>Ranges can be joined with either a space (which implies "and") or a +<code>||</code> (which implies "or").</p> <h2 id="Functions">Functions</h2> -<ul><li>valid(v): Return the parsed version, or null if it's not valid.</li><li>inc(v, release): Return the version incremented by the release type -(major, minor, patch, or build), or null if it's not valid.</li></ul> +<ul><li>valid(v): Return the parsed version, or null if it's not valid.</li><li>inc(v, release): Return the version incremented by the release type +(major, minor, patch, or build), or null if it's not valid.</li></ul> <h3 id="Comparison">Comparison</h3> -<ul><li>gt(v1, v2): <code>v1 > v2</code></li><li>gte(v1, v2): <code>v1 >= v2</code></li><li>lt(v1, v2): <code>v1 < v2</code></li><li>lte(v1, v2): <code>v1 <= v2</code></li><li>eq(v1, v2): <code>v1 == v2</code> This is true if they're logically equivalent, -even if they're not the exact same string. You already know how to -compare strings.</li><li>neq(v1, v2): <code>v1 != v2</code> The opposite of eq.</li><li>cmp(v1, comparator, v2): Pass in a comparison string, and it'll call -the corresponding function above. <code>"==="</code> and <code>"!=="</code> do simple +<ul><li>gt(v1, v2): <code>v1 > v2</code></li><li>gte(v1, v2): <code>v1 >= v2</code></li><li>lt(v1, v2): <code>v1 < v2</code></li><li>lte(v1, v2): <code>v1 <= v2</code></li><li>eq(v1, v2): <code>v1 == v2</code> This is true if they're logically equivalent, +even if they're not the exact same string. You already know how to +compare strings.</li><li>neq(v1, v2): <code>v1 != v2</code> The opposite of eq.</li><li>cmp(v1, comparator, v2): Pass in a comparison string, and it'll call +the corresponding function above. <code>"==="</code> and <code>"!=="</code> do simple string comparison, but are included for completeness. Throws if an invalid comparison string is provided.</li><li>compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort().</li><li>rcompare(v1, v2): The reverse of compare. Sorts an array of versions @@ -96,7 +96,7 @@ in descending order when passed to Array.sort().</li></ul> <h3 id="Ranges">Ranges</h3> -<ul><li>validRange(range): Return the valid range or null if it's not valid</li><li>satisfies(version, range): Return true if the version satisfies the +<ul><li>validRange(range): Return the valid range or null if it's not valid</li><li>satisfies(version, range): Return true if the version satisfies the range.</li><li>maxSatisfying(versions, range): Return the highest version in the list that satisfies the range, or null if none of them do.</li></ul> @@ -104,7 +104,7 @@ that satisfies the range, or null if none of them do.</li></ul> <ul><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">semver — npm@1.1.46</p> +<p id="footer">semver — npm@1.1.49</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") |