Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srod/node-version
Get Node current version
https://github.com/srod/node-version
node version
Last synced: 10 days ago
JSON representation
Get Node current version
- Host: GitHub
- URL: https://github.com/srod/node-version
- Owner: srod
- License: mit
- Created: 2011-08-12T23:26:44.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T21:29:26.000Z (7 months ago)
- Last Synced: 2024-04-14T12:04:54.622Z (7 months ago)
- Topics: node, version
- Language: TypeScript
- Homepage:
- Size: 2.15 MB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![GitHub Actions][github-actions-image]][github-actions-url]
[![Codecov][codecov-image]][codecov-url]# Node-version
A quick module that returns current node version parsed into parts.
## Installation
```shell
npm install node-version
# Or Yarn
yarn add node-version
# Or pnpm
pnpm add node-version
```## Quick Start
```js
import currentVersion from 'node-version';/*
console.log(currentVersion);{
original: 'v0.4.10', // same as process.version
short: '0.4',
long: '0.4.10',
major: '0',
minor: '4',
build: '10'
}
*/
```## Warning
Version 1.0.0 break 0.1.0 since its API changes.
Change
```js
var currentVersion = new (require('node-version').version)();
```To
```js
var currentVersion = require('node-version');
```[npm-version-image]: https://img.shields.io/npm/v/node-version.svg
[npm-downloads-image]: https://img.shields.io/npm/dm/node-version.svg
[npm-url]: https://npmjs.org/package/node-version
[github-actions-image]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fsrod%2Fnode-minify%2Fbadge%3Fref%3Ddevelop&style=flat
[github-actions-url]: https://github.com/srod/node-minify/actions
[codecov-image]: https://codecov.io/gh/srod/node-version/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/srod/node-version