From 58ed61ec8d509c36b8e8fcc0195bb3461d6386f9 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 16381ac93482cc..1f0df4dbcf9073 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