Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Dawson <mdawson@devrus.com>2021-12-21 18:03:44 +0300
committerMichael Dawson <mdawson@devrus.com>2021-12-23 21:31:54 +0300
commit6ce085c99b42ff3a63f7e11ebef7934174e825e1 (patch)
tree3c3a75e71a3e721aa52062807c5b27a1a9bf8edc /doc/api/n-api.md
parentf72c1978e0e88300fb71842fe48ca86d8d70eef7 (diff)
doc: fix example in node-api docs
Fixes: https://github.com/nodejs/node/issues/39564 Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: https://github.com/nodejs/node/pull/41264 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Diffstat (limited to 'doc/api/n-api.md')
-rw-r--r--doc/api/n-api.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/api/n-api.md b/doc/api/n-api.md
index c146a6d661d..7955d0442b5 100644
--- a/doc/api/n-api.md
+++ b/doc/api/n-api.md
@@ -4542,6 +4542,7 @@ snippet:
function AddTwo(num) {
return num + 2;
}
+global.AddTwo = AddTwo;
```
Then, the above function can be invoked from a native add-on using the