node-version is a lightweight JavaScript utility designed to parse the current Node.js runtime version (from `process.version`) into a structured object. It provides granular access to major, minor, and patch segments, alongside powerful helper methods for semantic version comparison, such as `isAtLeast`, `isAbove`, `isBelow`, and `isAtMost`. The package, currently at stable version 4.3.0, maintains an active release cadence with minor and patch updates introducing features like `eolDate` and `daysUntilEOL`. Key differentiators include its pure ESM architecture (since v4), full TypeScript support, and built-in checks for Node.js Long Term Support (LTS) status and End-of-Life (EOL) dates, making it an ideal choice for modern Node.js applications that require robust version management and awareness.
Verified import paths — ran on the pinned version, not inferred.
The 'node-version' package is ESM-only since v4.0.0. Using `require()` will result in an `ERR_REQUIRE_ESM` error.
This function returns a new `NodeVersion` object instance for the current process, distinct from the pre-instantiated `version` export. It also requires ESM `import`.
This is a TypeScript type import for type-checking purposes, not a runtime value. It is only relevant in TypeScript projects.
Demonstrates importing the `version` object and accessing its parsed properties and helper methods, including LTS/EOL checks. Also shows `getVersion()`.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.