node-addon-api is a header-only C++ wrapper library that simplifies the use of Node-API when building native Node.js addons in C++.
The tool solves the complexity of working directly with Node-API's C interface by providing C++ object model abstractions and exception handling semantics with low overhead. Rather than calling C functions directly, developers write idiomatic C++ code that the wrapper classes translate to the underlying Node-API calls, reducing boilerplate and potential errors.
Developers building native Node.js addons should choose this library if they prefer C++ over C and want to leverage modern C++ features while maintaining compatibility across Node.js versions. The tool is designed for addon maintainers who need their code to work across multiple active LTS Node.js releases. The project supports only active LTS versions, meaning a new major version is released annually when an LTS line goes out of service. The oldest supported Node.js version determines the minimum C++ standard required; the current version requires C++17 or later. Addon maintainers can use Node-API version badges to signal which Node.js major versions their addon supports.
The project maintains active engagement with the community through a structured contribution process documented in its guidelines. Development activity shows consistent attention to compatibility across Node.js release cycles, with the support model explicitly tied to LTS schedules rather than attempting to support all historical versions. The tool is updated to track changes in Node-API as new versions are released by Node.js.