node-version
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

NPM Version NPM Downloads GitHub Actions Codecov

Node-version

A quick module that returns current node version parsed into parts.

Installation

npm install node-version
# Or Yarn
yarn add node-version
# Or pnpm
pnpm add node-version

Quick Start

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

var currentVersion = new (require('node-version').version)();

To

var currentVersion = require('node-version');

Readme

Keywords

Package Sidebar

Install

npm i node-version

Weekly Downloads

384,569

Version

3.0.0

License

MIT

Unpacked Size

8.64 kB

Total Files

8

Last publish

Collaborators

  • srod