Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "es-semver", | ||
"version": "1.0.0", | ||
"description": "The semantic version parser used by npm.", | ||
"version": "1.0.1", | ||
"description": "Fork of the semantic version parser used by npm.", | ||
"module": "./src/index.js", | ||
@@ -18,3 +18,3 @@ "main": "./lib/index.js", | ||
"license": "ISC", | ||
"repository": "https://github.com/npm/node-semver", | ||
"repository": "https://github.com/fahrradflucht/es-semver", | ||
"bin": { | ||
@@ -21,0 +21,0 @@ "semver": "./bin/semver" |
@@ -1,4 +0,7 @@ | ||
semver(1) -- The semantic versioner for npm | ||
=========================================== | ||
# semver(1) -- The semantic versioner for npm | ||
A fork of [npm's semver package](https://github.com/npm/node-semver) that, in | ||
addition to the commonjs entry, provides es modules for the various | ||
functions. This enables treeshaking. | ||
## Install | ||
@@ -8,6 +11,21 @@ | ||
npm install --save es-semver | ||
```` | ||
``` | ||
## Usage | ||
As a an [es-module](https://tc39.github.io/ecma262/#sec-modules): | ||
```js | ||
import { valid, clean, satisfies, gt, lt, valid, coerce } from "es-semver"; | ||
valid('1.2.3') // '1.2.3' | ||
valid('a.b.c') // null | ||
clean(' =v1.2.3 ') // '1.2.3' | ||
satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true | ||
gt('1.2.3', '9.8.7') // false | ||
lt('1.2.3', '9.8.7') // true | ||
valid(coerce('v2')) // '2.0.0' | ||
valid(coerce('42.6.7.9.3-alpha')) // '42.6.7' | ||
``` | ||
As a node module: | ||
@@ -14,0 +32,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
425
108825
44