Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

es-semver

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-semver - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc