# parse-node-version

> Turn node's process.version into something useful.

Latest version **2.0.0** (published 2021-11-22) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-11-22 |
| First published | 2018-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/parse-node-version) |
| Module format | CommonJS |
| Node | >= 10.13.0 |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gulp Team |
| Maintainers | sttk, phated |
| Keywords | process.version, node version, version parse |

## Links

- npm: https://www.npmjs.com/package/parse-node-version
- Repository: https://github.com/gulpjs/parse-node-version
- Homepage: https://github.com/gulpjs/parse-node-version#readme
- Issues: https://github.com/gulpjs/parse-node-version/issues
- npm.io page: https://npm.io/package/parse-node-version

## Recent versions

- 2.0.0 (latest) — 2021-11-22
- 1.0.1 — 2019-01-30
- 1.0.0 — 2018-11-29

## README

<p align="center">
  <a href="http://gulpjs.com">
    <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
  </a>
</p>

# parse-node-version

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]

Turn node's process.version into something useful.

## Usage

```js
var nodeVersion = require('parse-node-version')(process.version);

console.log(
  nodeVersion.major,
  nodeVersion.minor,
  nodeVersion.patch,
  nodeVersion.pre,
  nodeVersion.build
);
```

## API

### parseVersion(nodeVersionString)

Takes a node version string (usually `process.version`) and returns an object with the `major`/`minor`/`patch` (which will all be numbers) and `pre`/`build` keys (which will always be a string). If the version doesn't contain any pre-release or build information, the properties will be returned as empty string.

## License

MIT

<!-- prettier-ignore-start -->
[downloads-image]: http://img.shields.io/npm/dm/parse-node-version.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/parse-node-version
[npm-image]: http://img.shields.io/npm/v/parse-node-version.svg?style=flat-square

[ci-url]: https://github.com/gulpjs/parse-node-version/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/parse-node-version/dev?style=flat-square

[coveralls-url]: https://coveralls.io/r/gulpjs/parse-node-version
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/parse-node-version/master.svg?style=flat-square
<!-- prettier-ignore-end -->

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