@@ -1016,8 +1016,7 @@ typedef enum {
10161016
10171017This represents the underlying binary scalar datatype of the TypedArray.
10181018Elements of this enum correspond to
1019- [Section 22.2](https://tc39.github.io/ecma262/#sec-typedarray-objects)
1020- of the [ECMAScript Language Specification][].
1019+ [Section 22.2][] of the [ECMAScript Language Specification][].
10211020
10221021### Object Creation Functions
10231022#### napi_create_array
@@ -1035,8 +1034,7 @@ Returns `napi_ok` if the API succeeded.
10351034
10361035This API returns an N-API value corresponding to a JavaScript Array type.
10371036JavaScript arrays are described in
1038- [Section 22.1](https://tc39.github.io/ecma262/#sec-array-objects) of the
1039- ECMAScript Language Specification.
1037+ [Section 22.1][] of the ECMAScript Language Specification.
10401038
10411039#### napi_create_array_with_length
10421040<!-- YAML
@@ -1064,8 +1062,7 @@ directly read and/or written via C, consider using
10641062[`napi_create_external_arraybuffer`][].
10651063
10661064JavaScript arrays are described in
1067- [Section 22.1](https://tc39.github.io/ecma262/#sec-array-objects) of the
1068- ECMAScript Language Specification.
1065+ [Section 22.1][] of the ECMAScript Language Specification.
10691066
10701067#### napi_create_arraybuffer
10711068<!-- YAML
@@ -1096,8 +1093,7 @@ written to directly from native code. To write to this buffer from JavaScript,
10961093a typed array or DataView object would need to be created.
10971094
10981095JavaScript ArrayBuffer objects are described in
1099- [Section 24.1](https://tc39.github.io/ecma262/#sec-arraybuffer-objects)
1100- of the ECMAScript Language Specification.
1096+ [Section 24.1][] of the ECMAScript Language Specification.
11011097
11021098#### napi_create_buffer
11031099<!-- YAML
@@ -1209,8 +1205,7 @@ managed. The caller must ensure that the byte buffer remains valid until the
12091205finalize callback is called.
12101206
12111207JavaScript ArrayBuffers are described in
1212- [Section 24.1](https://tc39.github.io/ecma262/#sec-arraybuffer-objects)
1213- of the ECMAScript Language Specification.
1208+ [Section 24.1][] of the ECMAScript Language Specification.
12141209
12151210#### napi_create_external_buffer
12161211<!-- YAML
@@ -1351,8 +1346,7 @@ be <= the size in bytes of the array passed in. If not, a RangeError exception i
13511346raised.
13521347
13531348JavaScript TypedArray Objects are described in
1354- [Section 22.2](https://tc39.github.io/ecma262/#sec-typedarray-objects)
1355- of the ECMAScript Language Specification.
1349+ [Section 22.2][] of the ECMAScript Language Specification.
13561350
13571351
13581352#### napi_create_dataview
@@ -1407,8 +1401,7 @@ This API is used to convert from the C `int32_t` type to the JavaScript
14071401Number type.
14081402
14091403The JavaScript Number type is described in
1410- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1411- of the ECMAScript Language Specification.
1404+ [Section 6.1.6][] of the ECMAScript Language Specification.
14121405
14131406#### napi_create_uint32
14141407<!-- YAML
@@ -1428,8 +1421,7 @@ This API is used to convert from the C `uint32_t` type to the JavaScript
14281421Number type.
14291422
14301423The JavaScript Number type is described in
1431- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1432- of the ECMAScript Language Specification.
1424+ [Section 6.1.6][] of the ECMAScript Language Specification.
14331425
14341426#### napi_create_int64
14351427<!-- YAML
@@ -1448,8 +1440,7 @@ Returns `napi_ok` if the API succeeded.
14481440This API is used to convert from the C `int64_t` type to the JavaScript
14491441Number type.
14501442
1451- The JavaScript Number type is described in
1452- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1443+ The JavaScript Number type is described in [Section 6.1.6][]
14531444of the ECMAScript Language Specification. Note the complete range of `int64_t`
14541445cannot be represented with full precision in JavaScript. Integer values
14551446outside the range of
@@ -1476,8 +1467,7 @@ This API is used to convert from the C `double` type to the JavaScript
14761467Number type.
14771468
14781469The JavaScript Number type is described in
1479- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1480- of the ECMAScript Language Specification.
1470+ [Section 6.1.6][] of the ECMAScript Language Specification.
14811471
14821472#### napi_create_string_latin1
14831473<!-- YAML
@@ -1501,8 +1491,7 @@ Returns `napi_ok` if the API succeeded.
15011491This API creates a JavaScript String object from a ISO-8859-1-encoded C string.
15021492
15031493The JavaScript String type is described in
1504- [Section 6.1.4](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type)
1505- of the ECMAScript Language Specification.
1494+ [Section 6.1.4][] of the ECMAScript Language Specification.
15061495
15071496#### napi_create_string_utf16
15081497<!-- YAML
@@ -1526,8 +1515,7 @@ Returns `napi_ok` if the API succeeded.
15261515This API creates a JavaScript String object from a UTF16-LE-encoded C string
15271516
15281517The JavaScript String type is described in
1529- [Section 6.1.4](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type)
1530- of the ECMAScript Language Specification.
1518+ [Section 6.1.4][] of the ECMAScript Language Specification.
15311519
15321520#### napi_create_string_utf8
15331521<!-- YAML
@@ -1551,8 +1539,7 @@ Returns `napi_ok` if the API succeeded.
15511539This API creates a JavaScript String object from a UTF8-encoded C string
15521540
15531541The JavaScript String type is described in
1554- [Section 6.1.4](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type)
1555- of the ECMAScript Language Specification.
1542+ [Section 6.1.4][] of the ECMAScript Language Specification.
15561543
15571544### Functions to convert from N-API to C types
15581545#### napi_get_array_length
@@ -1981,7 +1968,7 @@ This API returns the Undefined object.
19811968N-API exposes a set of APIs to perform some abstract operations on JavaScript
19821969values. Some of these operations are documented under
19831970[Section 7](https://tc39.github.io/ecma262/#sec-abstract-operations)
1984- of the [ECMAScript Language Specification](https://tc39.github.io/ecma262/) .
1971+ of the [ECMAScript Language Specification][] .
19851972
19861973These APIs support doing one of the following:
198719741. Coerce JavaScript values to specific JavaScript types (such as Number or
@@ -2249,7 +2236,7 @@ of the ECMAScript Language Specification.
22492236N-API exposes a set of APIs to get and set properties on JavaScript
22502237objects. Some of these types are documented under
22512238[Section 7](https://tc39.github.io/ecma262/#sec-operations-on-objects) of the
2252- [ECMAScript Language Specification](https://tc39.github.io/ecma262/) .
2239+ [ECMAScript Language Specification][] .
22532240
22542241Properties in JavaScript are represented as a tuple of a key and a value.
22552242Fundamentally, all property keys in N-API can be represented in one of the
@@ -2391,19 +2378,17 @@ typedef enum {
23912378
23922379`napi_property_attributes` are flags used to control the behavior of properties
23932380set on a JavaScript object. Other than `napi_static` they correspond to the
2394- attributes listed in [Section 6.1.7.1](https://tc39.github.io/ecma262/#table-2)
2395- of the [ECMAScript Language Specification](https://tc39.github.io/ecma262/) .
2381+ attributes listed in [Section 6.1.7.1][]
2382+ of the [ECMAScript Language Specification][] .
23962383They can be one or more of the following bitflags:
23972384
23982385- `napi_default` - Used to indicate that no explicit attributes are set on the
23992386given property. By default, a property is read only, not enumerable and not
24002387configurable.
24012388- `napi_writable` - Used to indicate that a given property is writable.
24022389- `napi_enumerable` - Used to indicate that a given property is enumerable.
2403- - `napi_configurable` - Used to indicate that a given property is
2404- configurable, as defined in
2405- [Section 6.1.7.1](https://tc39.github.io/ecma262/#table-2) of the
2406- [ECMAScript Language Specification](https://tc39.github.io/ecma262/).
2390+ - `napi_configurable` - Used to indicate that a given property is configurable,
2391+ as defined in [Section 6.1.7.1][] of the [ECMAScript Language Specification][].
24072392- `napi_static` - Used to indicate that the property will be defined as
24082393a static property on a class as opposed to an instance property, which is the
24092394default. This is used only by [`napi_define_class`][]. It is ignored by
@@ -3716,8 +3701,14 @@ NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env,
37163701[Object Lifetime Management]: #n_api_object_lifetime_management
37173702[Object Wrap]: #n_api_object_wrap
37183703[Script Execution]: #n_api_script_execution
3704+ [Section 6.1.4]: https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type
3705+ [Section 6.1.6]: https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type
3706+ [Section 6.1.7.1]: https://tc39.github.io/ecma262/#table-2
37193707[Section 9.1.6]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc
37203708[Section 12.5.5]: https://tc39.github.io/ecma262/#sec-typeof-operator
3709+ [Section 22.1]: https://tc39.github.io/ecma262/#sec-array-objects
3710+ [Section 22.2]: https://tc39.github.io/ecma262/#sec-typedarray-objects
3711+ [Section 24.1]: https://tc39.github.io/ecma262/#sec-arraybuffer-objects
37213712[Section 24.3]: https://tc39.github.io/ecma262/#sec-dataview-objects
37223713[Section 25.4]: https://tc39.github.io/ecma262/#sec-promise-objects
37233714[Working with JavaScript Functions]: #n_api_working_with_javascript_functions
0 commit comments