@@ -7,12 +7,13 @@ _Addons_ are dynamically-linked shared objects written in C++. The
77[ ` require() ` ] [ require ] function can load addons as ordinary Node.js modules.
88Addons provide an interface between JavaScript and C/C++ libraries.
99
10- There are three options for implementing addons: N -API, nan, or direct
10+ There are three options for implementing addons: Node -API, nan, or direct
1111use of internal V8, libuv and Node.js libraries. Unless there is a need for
12- direct access to functionality which is not exposed by N-API, use N-API.
13- Refer to [ C/C++ addons with N-API] ( n-api.md ) for more information on N-API.
12+ direct access to functionality which is not exposed by Node-API, use Node-API.
13+ Refer to [ C/C++ addons with Node-API] ( n-api.md ) for more information on
14+ Node-API.
1415
15- When not using N -API, implementing addons is complicated,
16+ When not using Node -API, implementing addons is complicated,
1617involving knowledge of several components and APIs:
1718
1819* V8: the C++ library Node.js uses to provide the
@@ -245,7 +246,7 @@ changes:
245246In order to be loaded from multiple Node.js environments,
246247such as a main thread and a Worker thread, an add-on needs to either:
247248
248- * Be an N -API addon, or
249+ * Be an Node -API addon, or
249250* Be declared as context-aware using `NODE_MODULE_INIT()` as described above
250251
251252In order to support [`Worker`][] threads, addons need to clean up any resources
@@ -437,11 +438,11 @@ addon developers are recommended to use to keep compatibility between past and
437438future releases of V8 and Node.js. See the ` nan ` [ examples] [ ] for an
438439illustration of how it can be used.
439440
440- ## N -API
441+ ## Node -API
441442
442443> Stability: 2 - Stable
443444
444- N -API is an API for building native addons. It is independent from
445+ Node -API is an API for building native addons. It is independent from
445446the underlying JavaScript runtime (e.g. V8) and is maintained as part of
446447Node.js itself. This API will be Application Binary Interface (ABI) stable
447448across versions of Node.js. It is intended to insulate addons from
@@ -451,17 +452,17 @@ recompilation. Addons are built/packaged with the same approach/tools
451452outlined in this document (node-gyp, etc.). The only difference is the
452453set of APIs that are used by the native code. Instead of using the V8
453454or [ Native Abstractions for Node.js] [ ] APIs, the functions available
454- in the N -API are used.
455+ in the Node -API are used.
455456
456457Creating and maintaining an addon that benefits from the ABI stability
457- provided by N -API carries with it certain
458+ provided by Node -API carries with it certain
458459[ implementation considerations] ( n-api.md#n_api_implications_of_abi_stability ) .
459460
460- To use N -API in the above "Hello world" example, replace the content of
461+ To use Node -API in the above "Hello world" example, replace the content of
461462` hello.cc ` with the following. All other instructions remain the same.
462463
463464``` cpp
464- // hello.cc using N -API
465+ // hello.cc using Node -API
465466#include < node_api.h>
466467
467468namespace demo {
@@ -493,7 +494,7 @@ NAPI_MODULE(NODE_GYP_MODULE_NAME, init)
493494```
494495
495496The functions available and how to use them are documented in
496- [C/C++ addons with N -API](n-api.md).
497+ [C/C++ addons with Node -API](n-api.md).
497498
498499## Addon examples
499500
0 commit comments