# node-version-compare

> a node module to compare semver version

Latest version **1.0.3** (published 2020-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-version-compare
pnpm add node-version-compare
yarn add node-version-compare
bun add node-version-compare
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-08-12 |
| First published | 2015-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | jiajun ma |
| Maintainers | majiajun |
| Keywords | semver, version, compare |

## Links

- npm: https://www.npmjs.com/package/node-version-compare
- Repository: https://github.com/leohihimax/node-version-compare
- Issues: https://github.com/leohihimax/node-version-compare/issues
- npm.io page: https://npm.io/package/node-version-compare

## Recent versions

- 1.0.3 (latest) — 2020-08-12
- 1.0.2 — 2019-02-24
- 1.0.1 — 2015-11-26
- 1.0.0 — 2015-11-26

## README

# node-version-compare

## a node module to compare semver versions

## Install

```shell
npm install --save node-version-compare
```

## Usage

```javascript
var compare = require('node-version-compare');

var result = compare('1.0.0', '1.0.1');                     // result = -1
    result = compare('10.2.0-alpha.1', '10.2.0-alpha.1');   // result = 0
    result = compare('10.2.0-beta', '10.2.0-alpha');        // result = 1
    result = compare('3.1.1-1', '3.1.1-2');                 // result = -1
```

---
_Source: https://npm.io/package/node-version-compare · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
