Why it matters
Version ranges decide what gets installed. ^1.2.3 allows 1.x but not 2.0; ^0.2.3 only allows 0.2.x; and a prerelease like 2.0.0-beta.1 is skipped unless the range names one. Getting it wrong means surprise upgrades in production or security fixes you never receive.
This checker uses npm's semantics, the same as the semver package, and rewrites each range as plain >= and < comparators so you can see its edges. Paste the versions published for a package to see exactly which ones a range will pick up.
How it works
- InputA range such as ^1.2.3 and a list of versions
- In your browsernpm's range rules, pre-releases included
- OutputWhich versions match, in plain English
Where it fits in a designer's workflow
- Plan
- Design
- Build
- Test
- Launch
By the numbers
Show the numbers as a table
| Range | Accepts |
|---|---|
| ^1.2.3 | 1.2.3, 1.2.10, 1.3.0, 1.9.4 |
| ~1.2.3 | 1.2.3, 1.2.10 |
| 1.x || >=2.5.0 | 1.2.2, 1.2.3, 1.2.10, 1.3.0, 1.9.4, 3.0.0 |
| 1.2 - 2.3 | 1.2.2, 1.2.3, 1.2.10, 1.3.0, 1.9.4, 2.0.0, 2.3.1 |
| >=1.3.0-beta <2 | 1.3.0-beta.1, 1.3.0, 1.9.4 |
| ^0.2.3 | none |
How to use it
- Type a range, such as ^1.4.0 or >=2 <3 || 4.x.
- Paste the versions you care about, one per line.
- See which match and the highest one.
- Read the comparators to check the edges.
FAQ
What's the difference between ^ and ~?
^ allows changes that don't touch the first non-zero part (^1.2.3 allows <2.0.0). ~ allows patch changes only (~1.2.3 allows <1.3.0).
Why doesn't my prerelease match?
npm only matches prereleases when a comparator in the range has a prerelease on the same major.minor.patch. That keeps betas out by accident.
Is this the same as Cargo or Composer?
Close, but not identical. Cargo treats a bare 1.2 as ^1.2. This tool follows npm.
Does it look up package versions?
No. Paste the versions yourself (npm view pkg versions --json gives them), and nothing is fetched.