Skip to content

Commit

Permalink
doc: remove "For example" expression in N-API doc
Browse files Browse the repository at this point in the history
PR-URL: #20187
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
Gabriel Schulhof authored and jasnell committed Apr 23, 2018
1 parent b4e86f1 commit 3d76055
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/api/n-api.md
Expand Up @@ -927,8 +927,8 @@ convenience. If `Init` returns NULL, the parameter passed as `exports` is
exported by the module. N-API modules cannot modify the `module` object but can
specify anything as the `exports` property of the module.

For example, to add the method `hello` as a function so that it can be called
as a method provided by the addon:
To add the method `hello` as a function so that it can be called as a method
provided by the addon:

```C
napi_value Init(napi_env env, napi_value exports) {
Expand All @@ -942,7 +942,7 @@ napi_value Init(napi_env env, napi_value exports) {
}
```
For example, to set a function to be returned by the `require()` for the addon:
To set a function to be returned by the `require()` for the addon:
```C
napi_value Init(napi_env env, napi_value exports) {
Expand All @@ -954,8 +954,8 @@ napi_value Init(napi_env env, napi_value exports) {
}
```

For example, to define a class so that new instances can be created
(often used with [Object Wrap][]):
To define a class so that new instances can be created (often used with
[Object Wrap][]):

```C
// NOTE: partial example, not all referenced code is included
Expand Down

0 comments on commit 3d76055

Please sign in to comment.