Skip to content

Commit ee954d5

Browse files
Trotttargos
authored andcommitted
doc: remove dashes
The use of dashes -- in general, but especially in our docs -- can be problematic. It is used inconsistently and there is always another form of punctuation that is as good or better for the situation. In an effort to reduce the number of variations we use to display the same types of information, remove the various uses of dashes from the documentation. PR-URL: #30101 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 56be32d commit ee954d5

26 files changed

+248
-250
lines changed

doc/api/addons.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ provide an interface between JavaScript running in Node.js and C/C++ libraries.
1111
There are three options for implementing Addons: N-API, nan, or direct
1212
use of internal V8, libuv and Node.js libraries. Unless you need direct
1313
access to functionality which is not exposed by N-API, use N-API.
14-
Refer to the section [C/C++ Addons - N-API](n-api.html)
15-
for more information on N-API.
14+
Refer to [C/C++ Addons with N-API](n-api.html) for more information on N-API.
1615

1716
When not using N-API, implementing Addons is complicated,
1817
involving knowledge of several components and APIs:
@@ -435,8 +434,8 @@ NAPI_MODULE(NODE_GYP_MODULE_NAME, init)
435434
} // namespace demo
436435
```
437436
438-
The functions available and how to use them are documented in the
439-
section titled [C/C++ Addons - N-API](n-api.html).
437+
The functions available and how to use them are documented in
438+
[C/C++ Addons with N-API](n-api.html).
440439
441440
## Addon examples
442441

doc/api/buffer.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -182,28 +182,28 @@ console.log(Buffer.from('fhqwhgads', 'utf16le'));
182182

183183
The character encodings currently supported by Node.js include:
184184

185-
* `'ascii'` - For 7-bit ASCII data only. This encoding is fast and will strip
185+
* `'ascii'`: For 7-bit ASCII data only. This encoding is fast and will strip
186186
the high bit if set.
187187

188-
* `'utf8'` - Multibyte encoded Unicode characters. Many web pages and other
188+
* `'utf8'`: Multibyte encoded Unicode characters. Many web pages and other
189189
document formats use UTF-8.
190190

191-
* `'utf16le'` - 2 or 4 bytes, little-endian encoded Unicode characters.
191+
* `'utf16le'`: 2 or 4 bytes, little-endian encoded Unicode characters.
192192
Surrogate pairs (U+10000 to U+10FFFF) are supported.
193193

194-
* `'ucs2'` - Alias of `'utf16le'`.
194+
* `'ucs2'`: Alias of `'utf16le'`.
195195

196-
* `'base64'` - Base64 encoding. When creating a `Buffer` from a string,
196+
* `'base64'`: Base64 encoding. When creating a `Buffer` from a string,
197197
this encoding will also correctly accept "URL and Filename Safe Alphabet" as
198198
specified in [RFC 4648, Section 5][].
199199

200-
* `'latin1'` - A way of encoding the `Buffer` into a one-byte encoded string
200+
* `'latin1'`: A way of encoding the `Buffer` into a one-byte encoded string
201201
(as defined by the IANA in [RFC 1345][],
202202
page 63, to be the Latin-1 supplement block and C0/C1 control codes).
203203

204-
* `'binary'` - Alias for `'latin1'`.
204+
* `'binary'`: Alias for `'latin1'`.
205205

206-
* `'hex'` - Encode each byte as two hexadecimal characters.
206+
* `'hex'`: Encode each byte as two hexadecimal characters.
207207

208208
Modern Web browsers follow the [WHATWG Encoding Standard][] which aliases
209209
both `'latin1'` and `'ISO-8859-1'` to `'win-1252'`. This means that while doing
@@ -1003,8 +1003,8 @@ The index operator `[index]` can be used to get and set the octet at position
10031003
range is between `0x00` and `0xFF` (hex) or `0` and `255` (decimal).
10041004

10051005
This operator is inherited from `Uint8Array`, so its behavior on out-of-bounds
1006-
access is the same as `UInt8Array` - that is, getting returns `undefined` and
1007-
setting does nothing.
1006+
access is the same as `UInt8Array`. In other words, getting returns `undefined`
1007+
and setting does nothing.
10081008

10091009
```js
10101010
// Copy an ASCII string into a `Buffer` one byte at a time.

doc/api/child_process.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -599,21 +599,21 @@ equal to `['pipe', 'pipe', 'pipe']`.
599599

600600
For convenience, `options.stdio` may be one of the following strings:
601601

602-
* `'pipe'` - equivalent to `['pipe', 'pipe', 'pipe']` (the default)
603-
* `'ignore'` - equivalent to `['ignore', 'ignore', 'ignore']`
604-
* `'inherit'` - equivalent to `['inherit', 'inherit', 'inherit']` or `[0, 1, 2]`
602+
* `'pipe'`: equivalent to `['pipe', 'pipe', 'pipe']` (the default)
603+
* `'ignore'`: equivalent to `['ignore', 'ignore', 'ignore']`
604+
* `'inherit'`: equivalent to `['inherit', 'inherit', 'inherit']` or `[0, 1, 2]`
605605

606606
Otherwise, the value of `options.stdio` is an array where each index corresponds
607607
to an fd in the child. The fds 0, 1, and 2 correspond to stdin, stdout,
608608
and stderr, respectively. Additional fds can be specified to create additional
609609
pipes between the parent and child. The value is one of the following:
610610

611-
1. `'pipe'` - Create a pipe between the child process and the parent process.
611+
1. `'pipe'`: Create a pipe between the child process and the parent process.
612612
The parent end of the pipe is exposed to the parent as a property on the
613613
`child_process` object as [`subprocess.stdio[fd]`][`subprocess.stdio`]. Pipes
614-
created for fds 0 - 2 are also available as [`subprocess.stdin`][],
614+
created for fds 0, 1, and 2 are also available as [`subprocess.stdin`][],
615615
[`subprocess.stdout`][] and [`subprocess.stderr`][], respectively.
616-
2. `'ipc'` - Create an IPC channel for passing messages/file descriptors
616+
2. `'ipc'`: Create an IPC channel for passing messages/file descriptors
617617
between parent and child. A [`ChildProcess`][] may have at most one IPC
618618
stdio file descriptor. Setting this option enables the
619619
[`subprocess.send()`][] method. If the child is a Node.js process, the
@@ -624,25 +624,25 @@ pipes between the parent and child. The value is one of the following:
624624
Accessing the IPC channel fd in any way other than [`process.send()`][]
625625
or using the IPC channel with a child process that is not a Node.js instance
626626
is not supported.
627-
3. `'ignore'` - Instructs Node.js to ignore the fd in the child. While Node.js
628-
will always open fds 0 - 2 for the processes it spawns, setting the fd to
629-
`'ignore'` will cause Node.js to open `/dev/null` and attach it to the
627+
3. `'ignore'`: Instructs Node.js to ignore the fd in the child. While Node.js
628+
will always open fds 0, 1, and 2 for the processes it spawns, setting the fd
629+
to `'ignore'` will cause Node.js to open `/dev/null` and attach it to the
630630
child's fd.
631-
4. `'inherit'` - Pass through the corresponding stdio stream to/from the
631+
4. `'inherit'`: Pass through the corresponding stdio stream to/from the
632632
parent process. In the first three positions, this is equivalent to
633633
`process.stdin`, `process.stdout`, and `process.stderr`, respectively. In
634634
any other position, equivalent to `'ignore'`.
635-
5. {Stream} object - Share a readable or writable stream that refers to a tty,
635+
5. {Stream} object: Share a readable or writable stream that refers to a tty,
636636
file, socket, or a pipe with the child process. The stream's underlying
637637
file descriptor is duplicated in the child process to the fd that
638638
corresponds to the index in the `stdio` array. The stream must have an
639639
underlying descriptor (file streams do not until the `'open'` event has
640640
occurred).
641-
6. Positive integer - The integer value is interpreted as a file descriptor
641+
6. Positive integer: The integer value is interpreted as a file descriptor
642642
that is currently open in the parent process. It is shared with the child
643643
process, similar to how {Stream} objects can be shared. Passing sockets
644644
is not supported on Windows.
645-
7. `null`, `undefined` - Use default value. For stdio fds 0, 1, and 2 (in other
645+
7. `null`, `undefined`: Use default value. For stdio fds 0, 1, and 2 (in other
646646
words, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the
647647
default is `'ignore'`.
648648

doc/api/cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ For example, `--pending-deprecation` is equivalent to `--pending_deprecation`.
3939
added: v8.0.0
4040
-->
4141

42-
Alias for stdin, analogous to the use of - in other command line utilities,
42+
Alias for stdin. Analogous to the use of `-` in other command line utilities,
4343
meaning that the script will be read from stdin, and the rest of the options
4444
are passed to that script.
4545

doc/api/crypto.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1382,15 +1382,15 @@ If `privateKey` is not a [`KeyObject`][], this function behaves as if
13821382
`privateKey` had been passed to [`crypto.createPrivateKey()`][]. If it is an
13831383
object, the following additional properties can be passed:
13841384

1385-
* `padding`: {integer} - Optional padding value for RSA, one of the following:
1385+
* `padding` {integer} Optional padding value for RSA, one of the following:
13861386
* `crypto.constants.RSA_PKCS1_PADDING` (default)
13871387
* `crypto.constants.RSA_PKCS1_PSS_PADDING`
13881388

13891389
`RSA_PKCS1_PSS_PADDING` will use MGF1 with the same hash function
13901390
used to sign the message as specified in section 3.1 of [RFC 4055][], unless
13911391
an MGF1 hash function has been specified as part of the key in compliance with
13921392
section 3.3 of [RFC 4055][].
1393-
* `saltLength`: {integer} - salt length for when padding is
1393+
* `saltLength` {integer} Salt length for when padding is
13941394
`RSA_PKCS1_PSS_PADDING`. The special value
13951395
`crypto.constants.RSA_PSS_SALTLEN_DIGEST` sets the salt length to the digest
13961396
size, `crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN` (default) sets it to the
@@ -1491,15 +1491,15 @@ If `object` is not a [`KeyObject`][], this function behaves as if
14911491
`object` had been passed to [`crypto.createPublicKey()`][]. If it is an
14921492
object, the following additional properties can be passed:
14931493

1494-
* `padding`: {integer} - Optional padding value for RSA, one of the following:
1494+
* `padding` {integer} Optional padding value for RSA, one of the following:
14951495
* `crypto.constants.RSA_PKCS1_PADDING` (default)
14961496
* `crypto.constants.RSA_PKCS1_PSS_PADDING`
14971497

14981498
`RSA_PKCS1_PSS_PADDING` will use MGF1 with the same hash function
14991499
used to verify the message as specified in section 3.1 of [RFC 4055][], unless
15001500
an MGF1 hash function has been specified as part of the key in compliance with
15011501
section 3.3 of [RFC 4055][].
1502-
* `saltLength`: {integer} - salt length for when padding is
1502+
* `saltLength` {integer} Salt length for when padding is
15031503
`RSA_PKCS1_PSS_PADDING`. The special value
15041504
`crypto.constants.RSA_PSS_SALTLEN_DIGEST` sets the salt length to the digest
15051505
size, `crypto.constants.RSA_PSS_SALTLEN_AUTO` (default) causes it to be
@@ -2856,13 +2856,13 @@ If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
28562856
passed to [`crypto.createPrivateKey()`][]. If it is an object, the following
28572857
additional properties can be passed:
28582858

2859-
* `padding`: {integer} - Optional padding value for RSA, one of the following:
2859+
* `padding` {integer} Optional padding value for RSA, one of the following:
28602860
* `crypto.constants.RSA_PKCS1_PADDING` (default)
28612861
* `crypto.constants.RSA_PKCS1_PSS_PADDING`
28622862

28632863
`RSA_PKCS1_PSS_PADDING` will use MGF1 with the same hash function
28642864
used to sign the message as specified in section 3.1 of [RFC 4055][].
2865-
* `saltLength`: {integer} - salt length for when padding is
2865+
* `saltLength` {integer} Salt length for when padding is
28662866
`RSA_PKCS1_PSS_PADDING`. The special value
28672867
`crypto.constants.RSA_PSS_SALTLEN_DIGEST` sets the salt length to the digest
28682868
size, `crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN` (default) sets it to the
@@ -2909,13 +2909,13 @@ If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
29092909
passed to [`crypto.createPublicKey()`][]. If it is an object, the following
29102910
additional properties can be passed:
29112911

2912-
* `padding`: {integer} - Optional padding value for RSA, one of the following:
2912+
* `padding` {integer} Optional padding value for RSA, one of the following:
29132913
* `crypto.constants.RSA_PKCS1_PADDING` (default)
29142914
* `crypto.constants.RSA_PKCS1_PSS_PADDING`
29152915

29162916
`RSA_PKCS1_PSS_PADDING` will use MGF1 with the same hash function
29172917
used to sign the message as specified in section 3.1 of [RFC 4055][].
2918-
* `saltLength`: {integer} - salt length for when padding is
2918+
* `saltLength` {integer} Salt length for when padding is
29192919
`RSA_PKCS1_PSS_PADDING`. The special value
29202920
`crypto.constants.RSA_PSS_SALTLEN_DIGEST` sets the salt length to the digest
29212921
size, `crypto.constants.RSA_PSS_SALTLEN_MAX_SIGN` (default) sets it to the

doc/api/debugger.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,21 @@ To begin watching an expression, type `watch('my_expression')`. The command
104104

105105
### Stepping
106106

107-
* `cont`, `c` - Continue execution
108-
* `next`, `n` - Step next
109-
* `step`, `s` - Step in
110-
* `out`, `o` - Step out
111-
* `pause` - Pause running code (like pause button in Developer Tools)
107+
* `cont`, `c`: Continue execution
108+
* `next`, `n`: Step next
109+
* `step`, `s`: Step in
110+
* `out`, `o`: Step out
111+
* `pause`: Pause running code (like pause button in Developer Tools)
112112

113113
### Breakpoints
114114

115-
* `setBreakpoint()`, `sb()` - Set breakpoint on current line
116-
* `setBreakpoint(line)`, `sb(line)` - Set breakpoint on specific line
117-
* `setBreakpoint('fn()')`, `sb(...)` - Set breakpoint on a first statement in
115+
* `setBreakpoint()`, `sb()`: Set breakpoint on current line
116+
* `setBreakpoint(line)`, `sb(line)`: Set breakpoint on specific line
117+
* `setBreakpoint('fn()')`, `sb(...)`: Set breakpoint on a first statement in
118118
functions body
119-
* `setBreakpoint('script.js', 1)`, `sb(...)` - Set breakpoint on first line of
119+
* `setBreakpoint('script.js', 1)`, `sb(...)`: Set breakpoint on first line of
120120
`script.js`
121-
* `clearBreakpoint('script.js', 1)`, `cb(...)` - Clear breakpoint in `script.js`
121+
* `clearBreakpoint('script.js', 1)`, `cb(...)`: Clear breakpoint in `script.js`
122122
on line 1
123123

124124
It is also possible to set a breakpoint in a file (module) that
@@ -147,26 +147,26 @@ debug>
147147

148148
### Information
149149

150-
* `backtrace`, `bt` - Print backtrace of current execution frame
151-
* `list(5)` - List scripts source code with 5 line context (5 lines before and
150+
* `backtrace`, `bt`: Print backtrace of current execution frame
151+
* `list(5)`: List scripts source code with 5 line context (5 lines before and
152152
after)
153-
* `watch(expr)` - Add expression to watch list
154-
* `unwatch(expr)` - Remove expression from watch list
155-
* `watchers` - List all watchers and their values (automatically listed on each
153+
* `watch(expr)`: Add expression to watch list
154+
* `unwatch(expr)`: Remove expression from watch list
155+
* `watchers`: List all watchers and their values (automatically listed on each
156156
breakpoint)
157-
* `repl` - Open debugger's repl for evaluation in debugging script's context
158-
* `exec expr` - Execute an expression in debugging script's context
157+
* `repl`: Open debugger's repl for evaluation in debugging script's context
158+
* `exec expr`: Execute an expression in debugging script's context
159159

160160
### Execution control
161161

162-
* `run` - Run script (automatically runs on debugger's start)
163-
* `restart` - Restart script
164-
* `kill` - Kill script
162+
* `run`: Run script (automatically runs on debugger's start)
163+
* `restart`: Restart script
164+
* `kill`: Kill script
165165

166166
### Various
167167

168-
* `scripts` - List all loaded scripts
169-
* `version` - Display V8's version
168+
* `scripts`: List all loaded scripts
169+
* `version`: Display V8's version
170170

171171
## Advanced Usage
172172

doc/api/deprecations.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,17 @@ API usability issues that can lead to accidental security issues.
141141
As an alternative, use one of the following methods of constructing `Buffer`
142142
objects:
143143

144-
* [`Buffer.alloc(size[, fill[, encoding]])`][alloc] - Create a `Buffer` with
144+
* [`Buffer.alloc(size[, fill[, encoding]])`][alloc]: Create a `Buffer` with
145145
*initialized* memory.
146-
* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size] - Create a `Buffer` with
146+
* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size]: Create a `Buffer` with
147147
*uninitialized* memory.
148-
* [`Buffer.allocUnsafeSlow(size)`][] - Create a `Buffer` with *uninitialized*
148+
* [`Buffer.allocUnsafeSlow(size)`][]: Create a `Buffer` with *uninitialized*
149149
memory.
150-
* [`Buffer.from(array)`][] - Create a `Buffer` with a copy of `array`
150+
* [`Buffer.from(array)`][]: Create a `Buffer` with a copy of `array`
151151
* [`Buffer.from(arrayBuffer[, byteOffset[, length]])`][from_arraybuffer] -
152152
Create a `Buffer` that wraps the given `arrayBuffer`.
153-
* [`Buffer.from(buffer)`][] - Create a `Buffer` that copies `buffer`.
154-
* [`Buffer.from(string[, encoding])`][from_string_encoding] - Create a `Buffer`
153+
* [`Buffer.from(buffer)`][]: Create a `Buffer` that copies `buffer`.
154+
* [`Buffer.from(string[, encoding])`][from_string_encoding]: Create a `Buffer`
155155
that copies `string`.
156156

157157
Without `--pending-deprecation`, runtime warnings occur only for code not in

doc/api/dgram.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,8 @@ changes:
673673
* `ipv6Only` {boolean} Setting `ipv6Only` to `true` will
674674
disable dual-stack support, i.e., binding to address `::` won't make
675675
`0.0.0.0` be bound. **Default:** `false`.
676-
* `recvBufferSize` {number} - Sets the `SO_RCVBUF` socket value.
677-
* `sendBufferSize` {number} - Sets the `SO_SNDBUF` socket value.
676+
* `recvBufferSize` {number} Sets the `SO_RCVBUF` socket value.
677+
* `sendBufferSize` {number} Sets the `SO_SNDBUF` socket value.
678678
* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
679679
* `callback` {Function} Attached as a listener for `'message'` events. Optional.
680680
* Returns: {dgram.Socket}
@@ -692,8 +692,8 @@ and port can be retrieved using [`socket.address().address`][] and
692692
added: v0.1.99
693693
-->
694694

695-
* `type` {string} - Either `'udp4'` or `'udp6'`.
696-
* `callback` {Function} - Attached as a listener to `'message'` events.
695+
* `type` {string} Either `'udp4'` or `'udp6'`.
696+
* `callback` {Function} Attached as a listener to `'message'` events.
697697
* Returns: {dgram.Socket}
698698

699699
Creates a `dgram.Socket` object of the specified `type`.

doc/api/esm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ throw when an attempt is made to import them:
286286

287287
```js
288288
import submodule from 'es-module-package/private-module.js';
289-
// Throws - Module not found
289+
// Throws ERR_MODULE_NOT_FOUND
290290
```
291291

292292
> Note: this is not a strong encapsulation as any private modules can still be

0 commit comments

Comments
 (0)