Get information about Node.js versions
This repository is managed by the Package Maintenance Working Group, see Governance.
Usage
$ npm i @pkgjs/nv
const nv = require('@pkgjs/nv')
(async () => {
const versions = await nv('lts')
console.log(versions)
})()
You can also pass an array of aliases and the resulting array will be sorted and de-duped, for example:
const versions = await nv(['lts', 'supported'])
console.log(versions.map((v) => v.version))
Supported Aliases
Support Aliases
For now referenced here until we have a more official doc: https://github.com/nodejs/package-maintenance/issues/236#issue-474783582
all
: All node versionslts_active
: Head of LTS and Active major version lineslts
: Head of current LTS linesactive
: The newest version in the active but not maintenance mode lineslts_latest
/lts/*
: Latest of the LTS lines (lts/*
for nvm compatibility)supported
: Head of all maintained lines- DEPRECATED
maintained
: Head of all maintained lines current
/node
: Newest of all maintained lines (node
for nvm compatibility)
Version Aliases
v6
, v8
, v10
, v12
, etc: Head of major version line by version numberdubnium
, carbon
: Named alias for LTS lines