Runs in this tab · nothing uploaded

EN

English

हिन्दीComing soon

EspañolComing soon

Pinned
HelpyTools

More

Semver range checker

Check whether versions satisfy an npm style range like ^1.2.3, ~2.0 or >=1.4 <2, with a plain English reason for every answer.

Runs in your browserNothing uploadedWorks offline
Loading Semver range checkerRuns on this device. Nothing is uploaded.

Questions

What is the difference between ^ and ~?

A tilde allows patch updates: ~1.2.3 means 1.2.3 up to but not including 1.3.0. A caret allows anything that keeps the left-most non-zero number: ^1.2.3 allows up to 2.0.0, ^0.2.3 up to 0.3.0, and ^0.0.3 only 0.0.3.

Why does 2.0.0-beta.1 not match ^1.2.3 or *?

npm follows a prerelease rule: a version like 1.3.0-beta only matches a range that itself names a prerelease of 1.3.0, such as >=1.3.0-beta.0. That stops you from picking up unstable versions by accident. Tick Include prereleases to switch the rule off, like npm's --include-prerelease.

Does it behave exactly like npm?

It follows the rules of node-semver, which npm uses: x-ranges, tilde, caret, hyphen ranges, || unions and the prerelease rule. It uses strict version parsing, so loose forms such as 1.2 or 01.2.3 are reported as invalid versions.

All developer tools

↑ ↓ move↵ openesc close

The tray

Install HelpyTools

Get HelpyTools on your home screen or Dock. It opens in its own window, and tools you have opened once keep working offline.