Skip to content

Commit 331e5e8

Browse files
Kamal Rawaladuh95
authored andcommitted
doc: fix grammar and editorial issues in addons documentation
Signed-off-by: Rawal27 <obviouslykamal@gmail.com> PR-URL: #64952 Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 0ad55e5 commit 331e5e8

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

doc/api/addons.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ There are three options for implementing addons:
1414
* `nan` ([Native Abstractions for Node.js][])
1515
* direct use of internal V8, libuv, and Node.js libraries
1616

17-
This rest of this document focuses on the latter, requiring
17+
The rest of this document focuses on the latter, requiring
1818
knowledge of multiple components and APIs:
1919

2020
* [V8][]: the C++ library Node.js uses to provide the
@@ -113,7 +113,7 @@ To integrate with the npm ecosystem, see the [Building][] section.
113113

114114
### Context-aware addons
115115

116-
Addons defined with `NODE_MODULE()` can not be loaded in multiple contexts or
116+
Addons defined with `NODE_MODULE()` cannot be loaded in multiple contexts or
117117
multiple threads at the same time.
118118

119119
There are environments in which Node.js addons may need to be loaded multiple
@@ -255,7 +255,7 @@ changes:
255255
In order to be loaded from multiple Node.js environments,
256256
such as a main thread and a Worker thread, an add-on needs to either:
257257

258-
* Be an [Node-API][] addon.
258+
* Be a [Node-API][] addon.
259259
* Be declared as context-aware using `NODE_MODULE_INIT()` as described above.
260260

261261
In order to support [`Worker`][] threads, addons need to clean up any resources
@@ -483,13 +483,13 @@ See [C/C++ addons with Node-API][Node-API].
483483

484484
## Addon examples
485485

486-
Following are some example addons intended to help developers get started. The
486+
The following are some example addons intended to help developers get started. The
487487
examples use the V8 APIs. Refer to the online [V8 reference][v8-docs]
488488
for help with the various V8 calls, and V8's [Embedder's Guide][] for an
489489
explanation of several concepts used such as handles, scopes, function
490490
templates, etc.
491491

492-
Each of these examples using the following `binding.gyp` file:
492+
Each of these examples uses the following `binding.gyp` file:
493493

494494
```json
495495
{
@@ -951,7 +951,7 @@ provided by the underlying V8 JavaScript engine. They are subject to change
951951
or removal at any time. They are not documented by Node.js or V8, and they
952952
should never be used outside of testing.
953953

954-
During shutdown of the process or worker threads destructors are not called
954+
During shutdown of the process or worker threads, destructors are not called
955955
by the JS engine. Therefore it's the responsibility of the user to track
956956
these objects and ensure proper destruction to avoid resource leaks.
957957

@@ -1171,7 +1171,7 @@ console.log(obj2.plusOne());
11711171

11721172
In addition to wrapping and returning C++ objects, it is possible to pass
11731173
wrapped objects around by unwrapping them with the Node.js helper function
1174-
`node::ObjectWrap::Unwrap`. The following examples shows a function `add()`
1174+
`node::ObjectWrap::Unwrap`. The following example shows a function `add()`
11751175
that can take two `MyObject` objects as input arguments:
11761176

11771177
```cpp

0 commit comments

Comments
 (0)