# node-api-version

> Gets the supported Node-API version for a specific node or electron version

Latest version **0.2.1** (published 2025-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-api-version
pnpm add node-api-version
yarn add node-api-version
bun add node-api-version
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2025-03-22 |
| First published | 2021-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tim Fish |
| Maintainers | timfish |

## Links

- npm: https://www.npmjs.com/package/node-api-version
- Repository: https://github.com/timfish/node-api-version
- npm.io page: https://npm.io/package/node-api-version

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) ^7.3.5

## Recent versions

- 0.2.1 (latest) — 2025-03-22
- 0.2.0 — 2023-12-02
- 0.1.4 — 2021-06-30
- 0.1.3 — 2021-06-30
- 0.1.2 — 2021-06-30
- 0.1.1 — 2021-06-30
- 0.1.0 — 2021-06-30

## README

# node-api-version

Get the maximum Node-API version supported for a specific version of node or Electron.

```js
const { fromNodeVersion, fromElectronVersion } = require("node-api-version");

fromNodeVersion("9.0.0"); // undefined
fromNodeVersion("12.13.0"); // 5

fromElectronVersion("2.0.0"); // undefined
fromElectronVersion("13.0.0"); // 7
fromElectronVersion("15.0.0-nightly.20210629"); // 8
```

---
_Source: https://npm.io/package/node-api-version · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
