Skip to content

Commit

Permalink
doc: drop 'Note that' in addons docs
Browse files Browse the repository at this point in the history
This commit removes the usage of 'Note that' in the addons
documentation. Note that this phrase was not adding anything
meaningful to the docs.

PR-URL: #28327
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
cjihrig authored and targos committed Jul 2, 2019
1 parent a213eb7 commit c9226f5
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize)
} // namespace demo
```
Note that all Node.js Addons must export an initialization function following
All Node.js Addons must export an initialization function following
the pattern:
```cpp
Expand Down Expand Up @@ -310,9 +310,8 @@ Because the exact path to the compiled Addon binary can vary depending on how
it is compiled (i.e. sometimes it may be in `./build/Debug/`), Addons can use
the [bindings][] package to load the compiled module.

Note that while the `bindings` package implementation is more sophisticated
in how it locates Addon modules, it is essentially using a try-catch pattern
similar to:
While the `bindings` package implementation is more sophisticated in how it
locates Addon modules, it is essentially using a try-catch pattern similar to:

```js
try {
Expand Down Expand Up @@ -588,10 +587,10 @@ NODE_MODULE(NODE_GYP_MODULE_NAME, Init)
} // namespace demo
```
Note that this example uses a two-argument form of `Init()` that receives
the full `module` object as the second argument. This allows the Addon
to completely overwrite `exports` with a single function instead of
adding the function as a property of `exports`.
This example uses a two-argument form of `Init()` that receives the full
`module` object as the second argument. This allows the Addon to completely
overwrite `exports` with a single function instead of adding the function as a
property of `exports`.
To test it, run the following JavaScript:
Expand All @@ -605,7 +604,7 @@ addon((msg) => {
});
```

Note that, in this example, the callback function is invoked synchronously.
In this example, the callback function is invoked synchronously.

### Object factory

Expand Down

0 comments on commit c9226f5

Please sign in to comment.