From dac8407944ecee19daf21dc213a61e06d3778880 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 21 Dec 2021 10:03:44 -0500 Subject: [PATCH] doc: fix example in node-api docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/39564 Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/41264 Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Chengzhong Wu Reviewed-By: Harshitha K P --- doc/api/n-api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index c146a6d661dddb..7955d0442b5e82 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