Skip to content

Commit f3b0dfc

Browse files
mhdawsondanielleadams
authored andcommitted
doc: fix example in node-api docs
Fixes: #39564 Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: #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>
1 parent 599c119 commit f3b0dfc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/api/n-api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4542,6 +4542,7 @@ snippet:
45424542
function AddTwo(num) {
45434543
return num + 2;
45444544
}
4545+
global.AddTwo = AddTwo;
45454546
```
45464547
45474548
Then, the above function can be invoked from a native add-on using the

0 commit comments

Comments
 (0)