JSPM

  • Created
  • Published
  • Downloads 500371420
  • Score
    100M100P100Q252630F

The semantic version parser used by npm.

Package Exports

  • semver

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (semver) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

semver

The semantic versioner for npm.

Usage

$ npm install semver

semver.valid('1.2.3') // true
semver.valid('a.b.c') // false
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

As a command-line utility:

$ semver -h

Usage: semver -v <version> [-r <range>]
Test if version(s) satisfy the supplied range(s),
and sort them.

Multiple versions or ranges may be supplied.

Program exits successfully if all versions satisfy all
ranges and are valid, and prints all satisfying versions.
If no versions are valid, or ranges are not satisfied,
then exits failure.

Versions are printed in ascending order, so supplying
multiple versions to the utility will just sort them.