From 1a25f9639a9668d8ea90022b0f3d3b47d29971b6 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 26 Aug 2018 19:02:27 +0300 Subject: doc: remove redundant 'Example:' and similar notes Some nits were also fixed in passing. PR-URL: https://github.com/nodejs/node/pull/22537 Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell --- doc/api/n-api.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'doc/api/n-api.md') diff --git a/doc/api/n-api.md b/doc/api/n-api.md index c047715395..a21d1f7ad7 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -451,7 +451,7 @@ originalName [code] ``` where `originalName` is the original name associated with the error -and `code` is the code that was provided. For example if the code +and `code` is the code that was provided. For example, if the code is `'ERR_ERROR_1'` and a `TypeError` is being created the name will be: ```text @@ -3478,8 +3478,6 @@ called on a class prototype and a function called on an instance of a class. A common pattern used to address this problem is to save a persistent reference to the class constructor for later `instanceof` checks. -As an example: - ```C napi_value MyClass_constructor = NULL; status = napi_get_reference_value(env, MyClass::es_constructor, &MyClass_constructor); @@ -3931,7 +3929,7 @@ invoking the callback. This should be a value previously obtained from [`napi_async_init`][]. - `[out] result`: The newly created scope. -There are cases (for example resolving promises) where it is +There are cases (for example, resolving promises) where it is necessary to have the equivalent of the scope associated with a callback in place when making certain N-API calls. If there is no other script on the stack the [`napi_open_callback_scope`][] and -- cgit v1.2.3