Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
doc: remove "For example" expression in N-API doc
  • Loading branch information
Gabriel Schulhof committed Apr 21, 2018
commit 3a994d117ce3e858a41ca56709bf0e2cd3f3e7f6
10 changes: 5 additions & 5 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
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