npm-compatible semver range parsing and matching.
A range is a union (||) of comparator sets.
Each comparator set is an intersection (space-separated) of comparators.
Summary
Functions
Parse an npm range string.
Check if a version satisfies a range.
Convert range to Elixir/hex_solver requirement string.
Types
@type comparator() :: {:gte | :lte | :gt | :lt | :eq, NPMSemver.Version.t()}
@type comparator_set() :: [comparator()]
@type t() :: %NPMSemver.Range{sets: [comparator_set()]}
Functions
Parse an npm range string.
@spec satisfies?(t(), NPMSemver.Version.t(), keyword()) :: boolean()
Check if a version satisfies a range.
Convert range to Elixir/hex_solver requirement string.