Skip to content

Commit

Permalink
Add range and comparator intersection docs to README
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfpessoa authored and isaacs committed Jul 24, 2017
1 parent afbe8ca commit 99f133e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -329,6 +329,10 @@ strings that they parse.
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
or null if the versions are the same.

### Comparators
* `intersects(comparator)`: Return true if the comparators intersect
* `satisfiesRange(range)`: Return true if the comparator intersects with any
of the range's comparators

### Ranges

Expand All @@ -347,6 +351,7 @@ strings that they parse.
the bounds of the range in either the high or low direction. The
`hilo` argument must be either the string `'>'` or `'<'`. (This is
the function called by `gtr` and `ltr`.)
* `intersects(range)`: Return true if any of the ranges comparators intersect

Note that, since ranges may be non-contiguous, a version might not be
greater than a range, less than a range, *or* satisfy a range! For
Expand Down

0 comments on commit 99f133e

Please sign in to comment.