diff options
author | Michael Dawson <mdawson@devrus.com> | 2021-12-21 18:03:44 +0300 |
---|---|---|
committer | Michael Dawson <mdawson@devrus.com> | 2021-12-23 21:31:54 +0300 |
commit | 6ce085c99b42ff3a63f7e11ebef7934174e825e1 (patch) | |
tree | 3c3a75e71a3e721aa52062807c5b27a1a9bf8edc /doc/api/n-api.md | |
parent | f72c1978e0e88300fb71842fe48ca86d8d70eef7 (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.md | 1 |
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 |