Skip to content

Commit 835d1ca

Browse files
nschonnitargos
authored andcommitted
doc: start unorded lists at start of line
Address Markdownlint MD006 rule. Can flag when list items aren't indented far enough. PR-URL: #29390 Reviewed-By: David Carlier <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 8023e43 commit 835d1ca

13 files changed

+718
-715
lines changed

doc/api/addons.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,34 @@ for more information on N-API.
1717
When not using N-API, implementing Addons is complicated,
1818
involving knowledge of several components and APIs:
1919

20-
- V8: the C++ library Node.js currently uses to provide the
21-
JavaScript implementation. V8 provides the mechanisms for creating objects,
22-
calling functions, etc. V8's API is documented mostly in the
23-
`v8.h` header file (`deps/v8/include/v8.h` in the Node.js source
24-
tree), which is also available [online][v8-docs].
25-
26-
- [libuv][]: The C library that implements the Node.js event loop, its worker
27-
threads and all of the asynchronous behaviors of the platform. It also
28-
serves as a cross-platform abstraction library, giving easy, POSIX-like
29-
access across all major operating systems to many common system tasks, such
30-
as interacting with the filesystem, sockets, timers, and system events. libuv
31-
also provides a pthreads-like threading abstraction that may be used to
32-
power more sophisticated asynchronous Addons that need to move beyond the
33-
standard event loop. Addon authors are encouraged to think about how to
34-
avoid blocking the event loop with I/O or other time-intensive tasks by
35-
off-loading work via libuv to non-blocking system operations, worker threads
36-
or a custom use of libuv's threads.
37-
38-
- Internal Node.js libraries. Node.js itself exports a number of C++ APIs
39-
that Addons can use &mdash; the most important of which is the
40-
`node::ObjectWrap` class.
41-
42-
- Node.js includes a number of other statically linked libraries including
43-
OpenSSL. These other libraries are located in the `deps/` directory in the
44-
Node.js source tree. Only the libuv, OpenSSL, V8 and zlib symbols are
45-
purposefully re-exported by Node.js and may be used to various extents by
46-
Addons.
47-
See [Linking to Node.js' own dependencies][] for additional information.
20+
- V8: the C++ library Node.js currently uses to provide the
21+
JavaScript implementation. V8 provides the mechanisms for creating objects,
22+
calling functions, etc. V8's API is documented mostly in the
23+
`v8.h` header file (`deps/v8/include/v8.h` in the Node.js source
24+
tree), which is also available [online][v8-docs].
25+
26+
- [libuv][]: The C library that implements the Node.js event loop, its worker
27+
threads and all of the asynchronous behaviors of the platform. It also
28+
serves as a cross-platform abstraction library, giving easy, POSIX-like
29+
access across all major operating systems to many common system tasks, such
30+
as interacting with the filesystem, sockets, timers, and system events. libuv
31+
also provides a pthreads-like threading abstraction that may be used to
32+
power more sophisticated asynchronous Addons that need to move beyond the
33+
standard event loop. Addon authors are encouraged to think about how to
34+
avoid blocking the event loop with I/O or other time-intensive tasks by
35+
off-loading work via libuv to non-blocking system operations, worker threads
36+
or a custom use of libuv's threads.
37+
38+
- Internal Node.js libraries. Node.js itself exports a number of C++ APIs
39+
that Addons can use &mdash; the most important of which is the
40+
`node::ObjectWrap` class.
41+
42+
- Node.js includes a number of other statically linked libraries including
43+
OpenSSL. These other libraries are located in the `deps/` directory in the
44+
Node.js source tree. Only the libuv, OpenSSL, V8 and zlib symbols are
45+
purposefully re-exported by Node.js and may be used to various extents by
46+
Addons.
47+
See [Linking to Node.js' own dependencies][] for additional information.
4848

4949
All of the following examples are available for [download][] and may
5050
be used as the starting-point for an Addon.

doc/api/buffer.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1363,11 +1363,11 @@ changes:
13631363

13641364
If `value` is:
13651365

1366-
* a string, `value` is interpreted according to the character encoding in
1367-
`encoding`.
1368-
* a `Buffer` or [`Uint8Array`][], `value` will be used in its entirety.
1369-
To compare a partial `Buffer`, use [`buf.slice()`][].
1370-
* a number, `value` will be interpreted as an unsigned 8-bit integer
1366+
* a string, `value` is interpreted according to the character encoding in
1367+
`encoding`.
1368+
* a `Buffer` or [`Uint8Array`][], `value` will be used in its entirety.
1369+
To compare a partial `Buffer`, use [`buf.slice()`][].
1370+
* a number, `value` will be interpreted as an unsigned 8-bit integer
13711371
value between `0` and `255`.
13721372

13731373
```js

doc/api/child_process.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ and asynchronous alternatives to [`child_process.spawn()`][] and
4343
[`child_process.spawnSync()`][]. Each of these alternatives are implemented on
4444
top of [`child_process.spawn()`][] or [`child_process.spawnSync()`][].
4545

46-
* [`child_process.exec()`][]: spawns a shell and runs a command within that
47-
shell, passing the `stdout` and `stderr` to a callback function when
48-
complete.
49-
* [`child_process.execFile()`][]: similar to [`child_process.exec()`][] except
50-
that it spawns the command directly without first spawning a shell by
51-
default.
52-
* [`child_process.fork()`][]: spawns a new Node.js process and invokes a
53-
specified module with an IPC communication channel established that allows
54-
sending messages between parent and child.
55-
* [`child_process.execSync()`][]: a synchronous version of
56-
[`child_process.exec()`][] that will block the Node.js event loop.
57-
* [`child_process.execFileSync()`][]: a synchronous version of
58-
[`child_process.execFile()`][] that will block the Node.js event loop.
46+
* [`child_process.exec()`][]: spawns a shell and runs a command within that
47+
shell, passing the `stdout` and `stderr` to a callback function when
48+
complete.
49+
* [`child_process.execFile()`][]: similar to [`child_process.exec()`][] except
50+
that it spawns the command directly without first spawning a shell by
51+
default.
52+
* [`child_process.fork()`][]: spawns a new Node.js process and invokes a
53+
specified module with an IPC communication channel established that allows
54+
sending messages between parent and child.
55+
* [`child_process.execSync()`][]: a synchronous version of
56+
[`child_process.exec()`][] that will block the Node.js event loop.
57+
* [`child_process.execFileSync()`][]: a synchronous version of
58+
[`child_process.execFile()`][] that will block the Node.js event loop.
5959

6060
For certain use cases, such as automating shell scripts, the
6161
[synchronous counterparts][] may be more convenient. In many cases, however,

doc/api/n-api.md

+52-51
Original file line numberDiff line numberDiff line change
@@ -4029,35 +4029,36 @@ napi_status napi_define_class(napi_env env,
40294029
napi_value* result);
40304030
```
40314031

4032-
- `[in] env`: The environment that the API is invoked under.
4033-
- `[in] utf8name`: Name of the JavaScript constructor function; this is
4034-
not required to be the same as the C++ class name, though it is recommended
4035-
for clarity.
4036-
- `[in] length`: The length of the `utf8name` in bytes, or `NAPI_AUTO_LENGTH`
4037-
if it is null-terminated.
4038-
- `[in] constructor`: Callback function that handles constructing instances
4039-
of the class. (This should be a static method on the class, not an actual
4040-
C++ constructor function.)
4041-
- `[in] data`: Optional data to be passed to the constructor callback as
4042-
the `data` property of the callback info.
4043-
- `[in] property_count`: Number of items in the `properties` array argument.
4044-
- `[in] properties`: Array of property descriptors describing static and
4045-
instance data properties, accessors, and methods on the class
4046-
See `napi_property_descriptor`.
4047-
- `[out] result`: A `napi_value` representing the constructor function for
4048-
the class.
4032+
- `[in] env`: The environment that the API is invoked under.
4033+
- `[in] utf8name`: Name of the JavaScript constructor function; this is
4034+
not required to be the same as the C++ class name, though it is recommended
4035+
for clarity.
4036+
- `[in] length`: The length of the `utf8name` in bytes, or `NAPI_AUTO_LENGTH`
4037+
if it is null-terminated.
4038+
- `[in] constructor`: Callback function that handles constructing instances
4039+
of the class. (This should be a static method on the class, not an actual
4040+
C++ constructor function.)
4041+
- `[in] data`: Optional data to be passed to the constructor callback as
4042+
the `data` property of the callback info.
4043+
- `[in] property_count`: Number of items in the `properties` array argument.
4044+
- `[in] properties`: Array of property descriptors describing static and
4045+
instance data properties, accessors, and methods on the class
4046+
See `napi_property_descriptor`.
4047+
- `[out] result`: A `napi_value` representing the constructor function for
4048+
the class.
40494049

40504050
Returns `napi_ok` if the API succeeded.
40514051

40524052
Defines a JavaScript class that corresponds to a C++ class, including:
4053-
- A JavaScript constructor function that has the class name and invokes the
4054-
provided C++ constructor callback.
4055-
- Properties on the constructor function corresponding to _static_ data
4056-
properties, accessors, and methods of the C++ class (defined by
4057-
property descriptors with the `napi_static` attribute).
4058-
- Properties on the constructor function's `prototype` object corresponding to
4059-
_non-static_ data properties, accessors, and methods of the C++ class
4060-
(defined by property descriptors without the `napi_static` attribute).
4053+
4054+
- A JavaScript constructor function that has the class name and invokes the
4055+
provided C++ constructor callback.
4056+
- Properties on the constructor function corresponding to _static_ data
4057+
properties, accessors, and methods of the C++ class (defined by
4058+
property descriptors with the `napi_static` attribute).
4059+
- Properties on the constructor function's `prototype` object corresponding to
4060+
_non-static_ data properties, accessors, and methods of the C++ class
4061+
(defined by property descriptors without the `napi_static` attribute).
40614062

40624063
The C++ constructor callback should be a static method on the class that calls
40634064
the actual class constructor, then wraps the new C++ instance in a JavaScript
@@ -4091,16 +4092,16 @@ napi_status napi_wrap(napi_env env,
40914092
napi_ref* result);
40924093
```
40934094

4094-
- `[in] env`: The environment that the API is invoked under.
4095-
- `[in] js_object`: The JavaScript object that will be the wrapper for the
4096-
native object.
4097-
- `[in] native_object`: The native instance that will be wrapped in the
4098-
JavaScript object.
4099-
- `[in] finalize_cb`: Optional native callback that can be used to free the
4100-
native instance when the JavaScript object is ready for garbage-collection.
4101-
- `[in] finalize_hint`: Optional contextual hint that is passed to the
4102-
finalize callback.
4103-
- `[out] result`: Optional reference to the wrapped object.
4095+
- `[in] env`: The environment that the API is invoked under.
4096+
- `[in] js_object`: The JavaScript object that will be the wrapper for the
4097+
native object.
4098+
- `[in] native_object`: The native instance that will be wrapped in the
4099+
JavaScript object.
4100+
- `[in] finalize_cb`: Optional native callback that can be used to free the
4101+
native instance when the JavaScript object is ready for garbage-collection.
4102+
- `[in] finalize_hint`: Optional contextual hint that is passed to the
4103+
finalize callback.
4104+
- `[out] result`: Optional reference to the wrapped object.
41044105

41054106
Returns `napi_ok` if the API succeeded.
41064107

@@ -4145,9 +4146,9 @@ napi_status napi_unwrap(napi_env env,
41454146
void** result);
41464147
```
41474148

4148-
- `[in] env`: The environment that the API is invoked under.
4149-
- `[in] js_object`: The object associated with the native instance.
4150-
- `[out] result`: Pointer to the wrapped native instance.
4149+
- `[in] env`: The environment that the API is invoked under.
4150+
- `[in] js_object`: The object associated with the native instance.
4151+
- `[out] result`: Pointer to the wrapped native instance.
41514152

41524153
Returns `napi_ok` if the API succeeded.
41534154

@@ -4172,9 +4173,9 @@ napi_status napi_remove_wrap(napi_env env,
41724173
void** result);
41734174
```
41744175

4175-
- `[in] env`: The environment that the API is invoked under.
4176-
- `[in] js_object`: The object associated with the native instance.
4177-
- `[out] result`: Pointer to the wrapped native instance.
4176+
- `[in] env`: The environment that the API is invoked under.
4177+
- `[in] js_object`: The object associated with the native instance.
4178+
- `[out] result`: Pointer to the wrapped native instance.
41784179

41794180
Returns `napi_ok` if the API succeeded.
41804181

@@ -4200,16 +4201,16 @@ napi_status napi_add_finalizer(napi_env env,
42004201
napi_ref* result);
42014202
```
42024203

4203-
- `[in] env`: The environment that the API is invoked under.
4204-
- `[in] js_object`: The JavaScript object to which the native data will be
4205-
attached.
4206-
- `[in] native_object`: The native data that will be attached to the JavaScript
4207-
object.
4208-
- `[in] finalize_cb`: Native callback that will be used to free the
4209-
native data when the JavaScript object is ready for garbage-collection.
4210-
- `[in] finalize_hint`: Optional contextual hint that is passed to the
4211-
finalize callback.
4212-
- `[out] result`: Optional reference to the JavaScript object.
4204+
- `[in] env`: The environment that the API is invoked under.
4205+
- `[in] js_object`: The JavaScript object to which the native data will be
4206+
attached.
4207+
- `[in] native_object`: The native data that will be attached to the JavaScript
4208+
object.
4209+
- `[in] finalize_cb`: Native callback that will be used to free the
4210+
native data when the JavaScript object is ready for garbage-collection.
4211+
- `[in] finalize_hint`: Optional contextual hint that is passed to the
4212+
finalize callback.
4213+
- `[out] result`: Optional reference to the JavaScript object.
42134214

42144215
Returns `napi_ok` if the API succeeded.
42154216

doc/api/repl.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -601,17 +601,17 @@ undefined
601601
Various behaviors of the Node.js REPL can be customized using the following
602602
environment variables:
603603

604-
- `NODE_REPL_HISTORY` - When a valid path is given, persistent REPL history
605-
will be saved to the specified file rather than `.node_repl_history` in the
606-
user's home directory. Setting this value to `''` (an empty string) will
607-
disable persistent REPL history. Whitespace will be trimmed from the value.
608-
On Windows platforms environment variables with empty values are invalid so
609-
set this variable to one or more spaces to disable persistent REPL history.
610-
- `NODE_REPL_HISTORY_SIZE` - Controls how many lines of history will be
611-
persisted if history is available. Must be a positive number.
612-
**Default:** `1000`.
613-
- `NODE_REPL_MODE` - May be either `'sloppy'` or `'strict'`. **Default:**
614-
`'sloppy'`, which will allow non-strict mode code to be run.
604+
- `NODE_REPL_HISTORY` - When a valid path is given, persistent REPL history
605+
will be saved to the specified file rather than `.node_repl_history` in the
606+
user's home directory. Setting this value to `''` (an empty string) will
607+
disable persistent REPL history. Whitespace will be trimmed from the value.
608+
On Windows platforms environment variables with empty values are invalid so
609+
set this variable to one or more spaces to disable persistent REPL history.
610+
- `NODE_REPL_HISTORY_SIZE` - Controls how many lines of history will be
611+
persisted if history is available. Must be a positive number.
612+
**Default:** `1000`.
613+
- `NODE_REPL_MODE` - May be either `'sloppy'` or `'strict'`. **Default:**
614+
`'sloppy'`, which will allow non-strict mode code to be run.
615615

616616
### Persistent History
617617

0 commit comments

Comments
 (0)