From c9226f5eb3dcb6f6e832479d49004d5f9541bdcd Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 20 Jun 2019 13:17:09 -0400 Subject: [PATCH] doc: drop 'Note that' in addons docs 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: https://github.com/nodejs/node/pull/28327 Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen --- doc/api/addons.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/api/addons.md b/doc/api/addons.md index c628cc66c595eb..eb17650223a6a5 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -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 @@ -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 { @@ -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: @@ -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