@@ -1025,7 +1025,7 @@ clear the exception. On success, result will contain the handle to
1025
1025
the last JavaScript `Object` thrown. If it is determined, after
1026
1026
retrieving the exception, the exception cannot be handled after all
1027
1027
it can be re-thrown it with [`napi_throw`][] where error is the
1028
- JavaScript `Error` object to be thrown.
1028
+ JavaScript value to be thrown.
1029
1029
1030
1030
The following utility functions are also available in case native code
1031
1031
needs to throw an exception or determine if a `napi_value` is an instance
@@ -1178,7 +1178,7 @@ NAPI_EXTERN napi_status napi_create_error(napi_env env,
1178
1178
* `[in] env`: The environment that the API is invoked under.
1179
1179
* `[in] code`: Optional `napi_value` with the string for the error code to be
1180
1180
associated with the error.
1181
- * `[in] msg`: `napi_value` that references a JavaScript `String ` to be used as
1181
+ * `[in] msg`: `napi_value` that references a JavaScript `string ` to be used as
1182
1182
the message for the `Error`.
1183
1183
* `[out] result`: `napi_value` representing the error created.
1184
1184
@@ -1202,7 +1202,7 @@ NAPI_EXTERN napi_status napi_create_type_error(napi_env env,
1202
1202
* `[in] env`: The environment that the API is invoked under.
1203
1203
* `[in] code`: Optional `napi_value` with the string for the error code to be
1204
1204
associated with the error.
1205
- * `[in] msg`: `napi_value` that references a JavaScript `String ` to be used as
1205
+ * `[in] msg`: `napi_value` that references a JavaScript `string ` to be used as
1206
1206
the message for the `Error`.
1207
1207
* `[out] result`: `napi_value` representing the error created.
1208
1208
@@ -1226,7 +1226,7 @@ NAPI_EXTERN napi_status napi_create_range_error(napi_env env,
1226
1226
* `[in] env`: The environment that the API is invoked under.
1227
1227
* `[in] code`: Optional `napi_value` with the string for the error code to be
1228
1228
associated with the error.
1229
- * `[in] msg`: `napi_value` that references a JavaScript `String ` to be used as
1229
+ * `[in] msg`: `napi_value` that references a JavaScript `string ` to be used as
1230
1230
the message for the `Error`.
1231
1231
* `[out] result`: `napi_value` representing the error created.
1232
1232
@@ -2357,14 +2357,14 @@ napi_status napi_create_symbol(napi_env env,
2357
2357
2358
2358
* `[in] env`: The environment that the API is invoked under.
2359
2359
* `[in] description`: Optional `napi_value` which refers to a JavaScript
2360
- `String ` to be set as the description for the symbol.
2361
- * `[out] result`: A `napi_value` representing a JavaScript `Symbol `.
2360
+ `string ` to be set as the description for the symbol.
2361
+ * `[out] result`: A `napi_value` representing a JavaScript `symbol `.
2362
2362
2363
2363
Returns `napi_ok` if the API succeeded.
2364
2364
2365
- This API creates a JavaScript `Symbol` object from a UTF8-encoded C string.
2365
+ This API creates a JavaScript `symbol` value from a UTF8-encoded C string.
2366
2366
2367
- The JavaScript `Symbol ` type is described in [Section 19.4][]
2367
+ The JavaScript `symbol ` type is described in [Section 19.4][]
2368
2368
of the ECMAScript Language Specification.
2369
2369
2370
2370
#### napi_create_typedarray
@@ -2451,14 +2451,14 @@ napi_status napi_create_int32(napi_env env, int32_t value, napi_value* result)
2451
2451
2452
2452
* `[in] env`: The environment that the API is invoked under.
2453
2453
* `[in] value`: Integer value to be represented in JavaScript.
2454
- * `[out] result`: A `napi_value` representing a JavaScript `Number `.
2454
+ * `[out] result`: A `napi_value` representing a JavaScript `number `.
2455
2455
2456
2456
Returns `napi_ok` if the API succeeded.
2457
2457
2458
2458
This API is used to convert from the C `int32_t` type to the JavaScript
2459
- `Number ` type.
2459
+ `number ` type.
2460
2460
2461
- The JavaScript `Number ` type is described in
2461
+ The JavaScript `number ` type is described in
2462
2462
[Section 6.1.6][] of the ECMAScript Language Specification.
2463
2463
2464
2464
#### napi_create_uint32
@@ -2473,14 +2473,14 @@ napi_status napi_create_uint32(napi_env env, uint32_t value, napi_value* result)
2473
2473
2474
2474
* `[in] env`: The environment that the API is invoked under.
2475
2475
* `[in] value`: Unsigned integer value to be represented in JavaScript.
2476
- * `[out] result`: A `napi_value` representing a JavaScript `Number `.
2476
+ * `[out] result`: A `napi_value` representing a JavaScript `number `.
2477
2477
2478
2478
Returns `napi_ok` if the API succeeded.
2479
2479
2480
2480
This API is used to convert from the C `uint32_t` type to the JavaScript
2481
- `Number ` type.
2481
+ `number ` type.
2482
2482
2483
- The JavaScript `Number ` type is described in
2483
+ The JavaScript `number ` type is described in
2484
2484
[Section 6.1.6][] of the ECMAScript Language Specification.
2485
2485
2486
2486
#### napi_create_int64
@@ -2495,14 +2495,14 @@ napi_status napi_create_int64(napi_env env, int64_t value, napi_value* result)
2495
2495
2496
2496
* `[in] env`: The environment that the API is invoked under.
2497
2497
* `[in] value`: Integer value to be represented in JavaScript.
2498
- * `[out] result`: A `napi_value` representing a JavaScript `Number `.
2498
+ * `[out] result`: A `napi_value` representing a JavaScript `number `.
2499
2499
2500
2500
Returns `napi_ok` if the API succeeded.
2501
2501
2502
2502
This API is used to convert from the C `int64_t` type to the JavaScript
2503
- `Number ` type.
2503
+ `number ` type.
2504
2504
2505
- The JavaScript `Number ` type is described in [Section 6.1.6][]
2505
+ The JavaScript `number ` type is described in [Section 6.1.6][]
2506
2506
of the ECMAScript Language Specification. Note the complete range of `int64_t`
2507
2507
cannot be represented with full precision in JavaScript. Integer values
2508
2508
outside the range of [`Number.MIN_SAFE_INTEGER`][] `-(2**53 - 1)` -
@@ -2520,14 +2520,14 @@ napi_status napi_create_double(napi_env env, double value, napi_value* result)
2520
2520
2521
2521
* `[in] env`: The environment that the API is invoked under.
2522
2522
* `[in] value`: Double-precision value to be represented in JavaScript.
2523
- * `[out] result`: A `napi_value` representing a JavaScript `Number `.
2523
+ * `[out] result`: A `napi_value` representing a JavaScript `number `.
2524
2524
2525
2525
Returns `napi_ok` if the API succeeded.
2526
2526
2527
2527
This API is used to convert from the C `double` type to the JavaScript
2528
- `Number ` type.
2528
+ `number ` type.
2529
2529
2530
- The JavaScript `Number ` type is described in
2530
+ The JavaScript `number ` type is described in
2531
2531
[Section 6.1.6][] of the ECMAScript Language Specification.
2532
2532
2533
2533
#### napi_create_bigint_int64
@@ -2616,14 +2616,14 @@ napi_status napi_create_string_latin1(napi_env env,
2616
2616
* `[in] str`: Character buffer representing an ISO-8859-1-encoded string.
2617
2617
* `[in] length`: The length of the string in bytes, or `NAPI_AUTO_LENGTH` if it
2618
2618
is null-terminated.
2619
- * `[out] result`: A `napi_value` representing a JavaScript `String `.
2619
+ * `[out] result`: A `napi_value` representing a JavaScript `string `.
2620
2620
2621
2621
Returns `napi_ok` if the API succeeded.
2622
2622
2623
- This API creates a JavaScript `String` object from an ISO-8859-1-encoded C
2623
+ This API creates a JavaScript `string` value from an ISO-8859-1-encoded C
2624
2624
string. The native string is copied.
2625
2625
2626
- The JavaScript `String ` type is described in
2626
+ The JavaScript `string ` type is described in
2627
2627
[Section 6.1.4][] of the ECMAScript Language Specification.
2628
2628
2629
2629
#### napi_create_string_utf16
@@ -2643,14 +2643,14 @@ napi_status napi_create_string_utf16(napi_env env,
2643
2643
* `[in] str`: Character buffer representing a UTF16-LE-encoded string.
2644
2644
* `[in] length`: The length of the string in two-byte code units, or
2645
2645
`NAPI_AUTO_LENGTH` if it is null-terminated.
2646
- * `[out] result`: A `napi_value` representing a JavaScript `String `.
2646
+ * `[out] result`: A `napi_value` representing a JavaScript `string `.
2647
2647
2648
2648
Returns `napi_ok` if the API succeeded.
2649
2649
2650
- This API creates a JavaScript `String` object from a UTF16-LE-encoded C string.
2650
+ This API creates a JavaScript `string` value from a UTF16-LE-encoded C string.
2651
2651
The native string is copied.
2652
2652
2653
- The JavaScript `String ` type is described in
2653
+ The JavaScript `string ` type is described in
2654
2654
[Section 6.1.4][] of the ECMAScript Language Specification.
2655
2655
2656
2656
#### napi_create_string_utf8
@@ -2670,14 +2670,14 @@ napi_status napi_create_string_utf8(napi_env env,
2670
2670
* `[in] str`: Character buffer representing a UTF8-encoded string.
2671
2671
* `[in] length`: The length of the string in bytes, or `NAPI_AUTO_LENGTH` if it
2672
2672
is null-terminated.
2673
- * `[out] result`: A `napi_value` representing a JavaScript `String `.
2673
+ * `[out] result`: A `napi_value` representing a JavaScript `string `.
2674
2674
2675
2675
Returns `napi_ok` if the API succeeded.
2676
2676
2677
- This API creates a JavaScript `String` object from a UTF8-encoded C string.
2677
+ This API creates a JavaScript `string` value from a UTF8-encoded C string.
2678
2678
The native string is copied.
2679
2679
2680
- The JavaScript `String ` type is described in
2680
+ The JavaScript `string ` type is described in
2681
2681
[Section 6.1.4][] of the ECMAScript Language Specification.
2682
2682
2683
2683
### Functions to convert from Node-API to C types
@@ -2841,7 +2841,7 @@ napi_status napi_get_dataview_info(napi_env env,
2841
2841
* `[in] env`: The environment that the API is invoked under.
2842
2842
* `[in] dataview`: `napi_value` representing the `DataView` whose
2843
2843
properties to query.
2844
- * `[out] byte_length`: ` Number` of bytes in the `DataView`.
2844
+ * `[out] byte_length`: Number of bytes in the `DataView`.
2845
2845
* `[out] data`: The data buffer underlying the `DataView`.
2846
2846
If byte_length is `0`, this may be `NULL` or any other pointer value.
2847
2847
* `[out] arraybuffer`: `ArrayBuffer` underlying the `DataView`.
@@ -2914,15 +2914,15 @@ napi_status napi_get_value_double(napi_env env,
2914
2914
```
2915
2915
2916
2916
* `[in] env`: The environment that the API is invoked under.
2917
- * `[in] value`: `napi_value` representing JavaScript `Number `.
2917
+ * `[in] value`: `napi_value` representing JavaScript `number `.
2918
2918
* `[out] result`: C double primitive equivalent of the given JavaScript
2919
- `Number `.
2919
+ `number `.
2920
2920
2921
2921
Returns `napi_ok` if the API succeeded. If a non-number `napi_value` is passed
2922
2922
in it returns `napi_number_expected`.
2923
2923
2924
2924
This API returns the C double primitive equivalent of the given JavaScript
2925
- `Number `.
2925
+ `number `.
2926
2926
2927
2927
#### napi_get_value_bigint_int64
2928
2928
<!-- YAML
@@ -3040,15 +3040,15 @@ napi_status napi_get_value_int32(napi_env env,
3040
3040
```
3041
3041
3042
3042
* `[in] env`: The environment that the API is invoked under.
3043
- * `[in] value`: `napi_value` representing JavaScript `Number `.
3043
+ * `[in] value`: `napi_value` representing JavaScript `number `.
3044
3044
* `[out] result`: C `int32` primitive equivalent of the given JavaScript
3045
- `Number `.
3045
+ `number `.
3046
3046
3047
3047
Returns `napi_ok` if the API succeeded. If a non-number `napi_value`
3048
3048
is passed in `napi_number_expected`.
3049
3049
3050
3050
This API returns the C `int32` primitive equivalent
3051
- of the given JavaScript `Number `.
3051
+ of the given JavaScript `number `.
3052
3052
3053
3053
If the number exceeds the range of the 32 bit integer, then the result is
3054
3054
truncated to the equivalent of the bottom 32 bits. This can result in a large
@@ -3070,17 +3070,17 @@ napi_status napi_get_value_int64(napi_env env,
3070
3070
```
3071
3071
3072
3072
* `[in] env`: The environment that the API is invoked under.
3073
- * `[in] value`: `napi_value` representing JavaScript `Number `.
3073
+ * `[in] value`: `napi_value` representing JavaScript `number `.
3074
3074
* `[out] result`: C `int64` primitive equivalent of the given JavaScript
3075
- `Number `.
3075
+ `number `.
3076
3076
3077
3077
Returns `napi_ok` if the API succeeded. If a non-number `napi_value`
3078
3078
is passed in it returns `napi_number_expected`.
3079
3079
3080
3080
This API returns the C `int64` primitive equivalent of the given JavaScript
3081
- `Number `.
3081
+ `number `.
3082
3082
3083
- `Number ` values outside the range of [`Number.MIN_SAFE_INTEGER`][]
3083
+ `number ` values outside the range of [`Number.MIN_SAFE_INTEGER`][]
3084
3084
`-(2**53 - 1)` - [`Number.MAX_SAFE_INTEGER`][] `(2**53 - 1)` will lose
3085
3085
precision.
3086
3086
@@ -3111,7 +3111,7 @@ napi_status napi_get_value_string_latin1(napi_env env,
3111
3111
* `[out] result`: Number of bytes copied into the buffer, excluding the null
3112
3112
terminator.
3113
3113
3114
- Returns `napi_ok` if the API succeeded. If a non-`String ` `napi_value`
3114
+ Returns `napi_ok` if the API succeeded. If a non-`string ` `napi_value`
3115
3115
is passed in it returns `napi_string_expected`.
3116
3116
3117
3117
This API returns the ISO-8859-1-encoded string corresponding the value passed
@@ -3141,7 +3141,7 @@ napi_status napi_get_value_string_utf8(napi_env env,
3141
3141
* `[out] result`: Number of bytes copied into the buffer, excluding the null
3142
3142
terminator.
3143
3143
3144
- Returns `napi_ok` if the API succeeded. If a non-`String ` `napi_value`
3144
+ Returns `napi_ok` if the API succeeded. If a non-`string ` `napi_value`
3145
3145
is passed in it returns `napi_string_expected`.
3146
3146
3147
3147
This API returns the UTF8-encoded string corresponding the value passed in.
@@ -3170,7 +3170,7 @@ napi_status napi_get_value_string_utf16(napi_env env,
3170
3170
* `[out] result`: Number of 2-byte code units copied into the buffer, excluding
3171
3171
the null terminator.
3172
3172
3173
- Returns `napi_ok` if the API succeeded. If a non-`String ` `napi_value`
3173
+ Returns `napi_ok` if the API succeeded. If a non-`string ` `napi_value`
3174
3174
is passed in it returns `napi_string_expected`.
3175
3175
3176
3176
This API returns the UTF16-encoded string corresponding the value passed in.
@@ -3188,7 +3188,7 @@ napi_status napi_get_value_uint32(napi_env env,
3188
3188
```
3189
3189
3190
3190
* `[in] env`: The environment that the API is invoked under.
3191
- * `[in] value`: `napi_value` representing JavaScript `Number `.
3191
+ * `[in] value`: `napi_value` representing JavaScript `number `.
3192
3192
* `[out] result`: C primitive equivalent of the given `napi_value` as a
3193
3193
`uint32_t`.
3194
3194
@@ -3278,8 +3278,8 @@ of the [ECMAScript Language Specification][].
3278
3278
3279
3279
These APIs support doing one of the following:
3280
3280
3281
- 1. Coerce JavaScript values to specific JavaScript types (such as `Number ` or
3282
- `String `).
3281
+ 1. Coerce JavaScript values to specific JavaScript types (such as `number ` or
3282
+ `string `).
3283
3283
2. Check the type of a JavaScript value.
3284
3284
3. Check for equality between two JavaScript values.
3285
3285
@@ -3319,7 +3319,7 @@ napi_status napi_coerce_to_number(napi_env env,
3319
3319
3320
3320
* `[in] env`: The environment that the API is invoked under.
3321
3321
* `[in] value`: The JavaScript value to coerce.
3322
- * `[out] result`: `napi_value` representing the coerced JavaScript `Number `.
3322
+ * `[out] result`: `napi_value` representing the coerced JavaScript `number `.
3323
3323
3324
3324
Returns `napi_ok` if the API succeeded.
3325
3325
@@ -3363,7 +3363,7 @@ napi_status napi_coerce_to_string(napi_env env,
3363
3363
3364
3364
* `[in] env`: The environment that the API is invoked under.
3365
3365
* `[in] value`: The JavaScript value to coerce.
3366
- * `[out] result`: `napi_value` representing the coerced JavaScript `String `.
3366
+ * `[out] result`: `napi_value` representing the coerced JavaScript `string `.
3367
3367
3368
3368
Returns `napi_ok` if the API succeeded.
3369
3369
@@ -3647,7 +3647,7 @@ following forms:
3647
3647
* Named: a simple UTF8-encoded string
3648
3648
* Integer-Indexed: an index value represented by `uint32_t`
3649
3649
* JavaScript value: these are represented in Node-API by `napi_value`. This can
3650
- be a `napi_value` representing a `String `, `Number `, or `Symbol `.
3650
+ be a `napi_value` representing a `string `, `number `, or `symbol `.
3651
3651
3652
3652
Node-API values are represented by the type `napi_value`.
3653
3653
Any Node-API call that requires a JavaScript value takes in a `napi_value`.
@@ -3842,7 +3842,7 @@ typedef struct {
3842
3842
} napi_property_descriptor;
3843
3843
```
3844
3844
3845
- * `utf8name`: Optional `String` describing the key for the property,
3845
+ * `utf8name`: Optional string describing the key for the property,
3846
3846
encoded as UTF8. One of `utf8name` or `name` must be provided for the
3847
3847
property.
3848
3848
* `name`: Optional `napi_value` that points to a JavaScript string or symbol
@@ -4039,8 +4039,8 @@ napi_status napi_has_own_property(napi_env env,
4039
4039
Returns `napi_ok` if the API succeeded.
4040
4040
4041
4041
This API checks if the `Object` passed in has the named own property. `key` must
4042
- be a string or a `Symbol `, or an error will be thrown. Node-API will not perform
4043
- any conversion between data types.
4042
+ be a ` string` or a `symbol `, or an error will be thrown. Node-API will not
4043
+ perform any conversion between data types.
4044
4044
4045
4045
#### napi_set_named_property
4046
4046
<!-- YAML
@@ -4317,7 +4317,7 @@ NAPI_EXTERN napi_status napi_call_function(napi_env env,
4317
4317
```
4318
4318
4319
4319
* `[in] env`: The environment that the API is invoked under.
4320
- * `[in] recv`: The `this` object passed to the called function.
4320
+ * `[in] recv`: The `this` value passed to the called function.
4321
4321
* `[in] func`: `napi_value` representing the JavaScript function to be invoked.
4322
4322
* `[in] argc`: The count of elements in the `argv` array.
4323
4323
* `[in] argv`: Array of `napi_values` representing JavaScript values passed in
@@ -5283,7 +5283,7 @@ NAPI_EXTERN napi_status napi_make_callback(napi_env env,
5283
5283
for `async_context` does not result in an error. However, this results
5284
5284
in incorrect operation of async hooks. Potential issues include loss of
5285
5285
async context when using the `AsyncLocalStorage` API.
5286
- * `[in] recv`: The `this` object passed to the called function.
5286
+ * `[in] recv`: The `this` value passed to the called function.
5287
5287
* `[in] func`: `napi_value` representing the JavaScript function to be invoked.
5288
5288
* `[in] argc`: The count of elements in the `argv` array.
5289
5289
* `[in] argv`: Array of JavaScript values as `napi_value` representing the
0 commit comments