Skip to content

Commit 35b6571

Browse files
authored
Fix: some typos in documentation (#826)
1 parent 8983383 commit 35b6571

15 files changed

+22
-22
lines changed

doc/async_context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void MakeCallbackWithAsyncContext(const Napi::CallbackInfo& info) {
7373
Napi::Function callback = info[0].As<Napi::Function>();
7474
Napi::Object resource = info[1].As<Napi::Object>();
7575

76-
// Creat a new async context instance.
76+
// Create a new async context instance.
7777
Napi::AsyncContext context(info.Env(), "async_context_test", resource);
7878

7979
// Invoke the callback with the async context instance.

doc/async_worker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class EchoWorker : public AsyncWorker {
395395
};
396396
```
397397

398-
The `EchoWorker`'s contructor calls the base class' constructor to pass in the
398+
The `EchoWorker`'s constructor calls the base class' constructor to pass in the
399399
callback that the `Napi::AsyncWorker` base class will store persistently. When
400400
the work on the `Napi::AsyncWorker::Execute` method is done the
401401
`Napi::AsyncWorker::OnOk` method is called and the results return back to

doc/boolean.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Napi::Boolean::Boolean();
1818

1919
Returns a new _empty_ `Napi::Boolean` object.
2020

21-
### Contructor
21+
### Constructor
2222

2323
Creates a new instance of the `Napi::Boolean` object.
2424

doc/checker-tool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ indicating for each addon whether it is an N-API addon.
2626
```
2727
2828
The tool accepts the root directory from which to start checking for Node.js
29-
native addons as a single optional command line parameter. If ommitted it will
29+
native addons as a single optional command line parameter. If omitted it will
3030
start checking from the current directory (`.`).
3131
3232
[checker tool]: ../tools/check-napi.js

doc/creating_a_release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ the route folder of the repo launch the following command:
3636
```bash
3737
> changelog-maker
3838
```
39-
* Use the output generated by **changelog maker** to pdate the [CHANGELOG.md](https://github.com/nodejs/node-addon-api/blob/master/CHANGELOG.md)
39+
* Use the output generated by **changelog maker** to update the [CHANGELOG.md](https://github.com/nodejs/node-addon-api/blob/master/CHANGELOG.md)
4040
following the style used in publishing the previous release.
4141

4242
* Add any new contributors to the "contributors" section in the package.json

doc/escapable_handle_scope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Napi::EscapableHandleScope::~EscapableHandleScope();
5959

6060
Deletes the `Napi::EscapableHandleScope` instance and allows any objects/handles created
6161
in the scope to be collected by the garbage collector. There is no
62-
guarantee as to when the gargbage collector will do this.
62+
guarantee as to when the garbage collector will do this.
6363

6464
### Escape
6565

doc/function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Napi::Object Napi::Function::New(const std::initializer_list<napi_value>& args)
218218
```
219219

220220
- `[in] args`: Initializer list of JavaScript values as `napi_value` representing
221-
the arguments of the contructor function.
221+
the arguments of the constructor function.
222222

223223
Returns a new JavaScript object.
224224

@@ -245,7 +245,7 @@ object.
245245
Napi::Object Napi::Function::New(size_t argc, const napi_value* args) const;
246246
```
247247

248-
- `[in] argc`: The number of the arguments passed to the contructor function.
248+
- `[in] argc`: The number of the arguments passed to the constructor function.
249249
- `[in] args`: Array of JavaScript values as `napi_value` representing the
250250
arguments of the constructor function.
251251

doc/function_reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Napi::Object Napi::FunctionReference::New(const std::initializer_list<napi_value
7373
```
7474

7575
- `[in] args`: Initializer list of JavaScript values as `napi_value` representing
76-
the arguments of the contructor function.
76+
the arguments of the constructor function.
7777

7878
Returns a new JavaScript object.
7979

doc/handle_scope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Napi::HandleScope::~HandleScope();
5454

5555
Deletes the `Napi::HandleScope` instance and allows any objects/handles created
5656
in the scope to be collected by the garbage collector. There is no
57-
guarantee as to when the gargbage collector will do this.
57+
guarantee as to when the garbage collector will do this.
5858

5959
### Env
6060

doc/number.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Napi::Number();
1616

1717
Returns a new _empty_ `Napi::Number` object.
1818

19-
### Contructor
19+
### Constructor
2020

2121
Creates a new instance of a `Napi::Number` object.
2222

doc/object_lifetime_management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ a native method must be deleted before returning from that method. Since
6060
deletion, however, care must be taken to create the scope in the right
6161
place such that you achieve the desired lifetime.
6262

63-
Taking the earlier example, creating a `Napi::HandleScope` in the innner loop
63+
Taking the earlier example, creating a `Napi::HandleScope` in the inner loop
6464
would ensure that at most a single new value is held alive throughout the
6565
execution of the loop:
6666

doc/prebuild_tools.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ In order to install a native add-on it's important to have all the necessary
55
dependencies installed and well configured (see the [setup](setup.md) section).
66
The end-user will need to compile the add-on when they will do an `npm install`
77
and in some cases this could create problems. To avoid the compilation process it's
8-
possible to ditribute the native add-on in pre-built form for different platform
9-
and architectures. The prebuild tools help to create and distrubute the pre-built
8+
possible to distribute the native add-on in pre-built form for different platform
9+
and architectures. The prebuild tools help to create and distribute the pre-built
1010
form of a native add-on.
1111

1212
The following list report known tools that are compatible with **N-API**:

doc/property_descriptor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Property Descriptor
22

3-
A [`Napi::Object`](object.md) can be assigned properites via its [`DefineProperty`](object.md#defineproperty) and [`DefineProperties`](object.md#defineproperties) functions, which take PropertyDescrptor(s) as their parameters. The `Napi::PropertyDescriptor` can contain either values or functions, which are then assigned to the `Napi::Object`. Note that a single instance of a `Napi::PropertyDescriptor` class can only contain either one value, or at most two functions. PropertyDescriptors can only be created through the class methods [`Accessor`](#accessor), [`Function`](#function), or [`Value`](#value), each of which return a new static instance of a `Napi::PropertyDescriptor`.
3+
A [`Napi::Object`](object.md) can be assigned properties via its [`DefineProperty`](object.md#defineproperty) and [`DefineProperties`](object.md#defineproperties) functions, which take PropertyDescriptor(s) as their parameters. The `Napi::PropertyDescriptor` can contain either values or functions, which are then assigned to the `Napi::Object`. Note that a single instance of a `Napi::PropertyDescriptor` class can only contain either one value, or at most two functions. PropertyDescriptors can only be created through the class methods [`Accessor`](#accessor), [`Function`](#function), or [`Value`](#value), each of which return a new static instance of a `Napi::PropertyDescriptor`.
44

55
## Example
66

@@ -150,7 +150,7 @@ static Napi::PropertyDescriptor Napi::PropertyDescriptor::Accessor (
150150
void *data = nullptr);
151151
```
152152

153-
* `[in] env`: The environemnt in which to create this accessor.
153+
* `[in] env`: The environment in which to create this accessor.
154154
* `[in] object`: The object on which the accessor will be defined.
155155
* `[in] name`: The name used for the getter function.
156156
* `[in] getter`: A getter function.
@@ -199,7 +199,7 @@ static Napi::PropertyDescriptor Napi::PropertyDescriptor::Accessor (
199199
void *data = nullptr);
200200
```
201201

202-
* `[in] env`: The environemnt in which to create this accessor.
202+
* `[in] env`: The environment in which to create this accessor.
203203
* `[in] object`: The object on which the accessor will be defined.
204204
* `[in] name`: The name of the getter and setter function.
205205
* `[in] getter`: The getter function.

doc/threadsafe_function.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ New(napi_env env,
102102
there be no threads left using the thread-safe function after the finalize
103103
callback completes. Must implement `void operator()(Env env, DataType* data,
104104
Context* hint)`, skipping `data` or `hint` if they are not provided.
105-
Can be retreived via `GetContext()`.
105+
Can be retrieved via `GetContext()`.
106106
- `[optional] data`: Data to be passed to `finalizeCallback`.
107107

108108
Returns a non-empty `Napi::ThreadSafeFunction` instance.
@@ -158,7 +158,7 @@ napi_status Napi::ThreadSafeFunction::Abort()
158158
Returns one of:
159159
- `napi_ok`: The thread-safe function has been successfully aborted.
160160
- `napi_invalid_arg`: The thread-safe function's thread-count is zero.
161-
- `napi_generic_failure`: A generic error occurred when attemping to abort
161+
- `napi_generic_failure`: A generic error occurred when attempting to abort
162162
the thread-safe function.
163163

164164
### BlockingCall / NonBlockingCall
@@ -210,7 +210,7 @@ Returns one of:
210210
- `napi_closing`: The thread-safe function is aborted and cannot accept more
211211
calls.
212212
- `napi_invalid_arg`: The thread-safe function is closed.
213-
- `napi_generic_failure`: A generic error occurred when attemping to add to the
213+
- `napi_generic_failure`: A generic error occurred when attempting to add to the
214214
queue.
215215

216216
## Example

doc/version_management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Returns the highest N-API version supported by Node.js runtime.
2020
2121
### GetNodeVersion
2222
23-
Retrives information about Node.js version present on the system. All the
24-
information is stored in the `napi_node_version` structrue that is defined as
23+
Retrieves information about Node.js version present on the system. All the
24+
information is stored in the `napi_node_version` structure that is defined as
2525
shown below:
2626
2727
```cpp

0 commit comments

Comments
 (0)