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

0.2.2 • Public • Published

Get information about Node.js versions

NPM Version NPM Downloads js-standard-style CI Test

This repository is managed by the Package Maintenance Working Group, see Governance.


$ npm i @pkgjs/nv
const nv = require('@pkgjs/nv')

(async () => {
  const versions = await nv('lts')
    "version": "18.18.2",
    "major": 18,
    "minor": 18,
    "patch": 2,
    "tag": "",
    "codename": "hydrogen",
    "versionName": "v18",
    "start": "2022-04-19T00:00:00.000Z",
    "lts": "2022-10-25T00:00:00.000Z",
    "maintenance": "2023-10-18T00:00:00.000Z",
    "end": "2025-04-30T00:00:00.000Z",
    "releaseDate": "2023-10-13T00:00:00.000Z",
    "isLts": true,
    "files": [
    "dependencies": {
      "npm": "9.8.1",
      "v8": "",
      "uv": "1.44.2",
      "zlib": "",
      "openssl": "3.0.10+quic"

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))
[ '8.16.1', '10.16.3', '12.11.0' ]

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 versions
  • lts_active: Head of LTS and Active major version lines
  • lts: Head of current LTS lines
  • active: The newest version in the active but not maintenance mode lines
  • lts_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 number
  • dubnium, carbon: Named alias for LTS lines

Package Sidebar


npm i @pkgjs/nv

Weekly Downloads






Unpacked Size

24.9 kB

Total Files


Last publish


  • iansu
  • thescientist13
  • jonchurch
  • wesleytodd
  • bethany.griggs
  • dominykas
  • darcyclarke
  • mhdawson1
  • nodejs-foundation