Skip to content

Commit e5c2059

Browse files
matejkrajcovicgibfahn
authored andcommitted
doc: make default values and periods consistent
PR-URL: #16563 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent d576e17 commit e5c2059

File tree

6 files changed

+68
-69
lines changed

6 files changed

+68
-69
lines changed

doc/api/cluster.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,8 @@ changes:
740740

741741
* {Object}
742742
* `execArgv` {Array} List of string arguments passed to the Node.js
743-
executable. (Default=`process.execArgv`)
744-
* `exec` {string} File path to worker file. (Default=`process.argv[1]`)
743+
executable. **Default:** `process.execArgv`
744+
* `exec` {string} File path to worker file. **Default:** `process.argv[1]`
745745
* `args` {Array} String arguments passed to worker.
746746
**Default:** `process.argv.slice(2)`
747747
* `silent` {boolean} Whether or not to send output to parent's stdio.

doc/api/dns.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ changes:
141141
- `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
142142
flags may be passed by bitwise `OR`ing their values.
143143
- `all` {boolean} When `true`, the callback returns all resolved addresses in
144-
an array. Otherwise, returns a single address. Defaults to `false`.
144+
an array. Otherwise, returns a single address. **Default:** `false`
145145
- `verbatim` {boolean} When `true`, the callback receives IPv4 and IPv6
146146
addresses in the order the DNS resolver returned them. When `false`,
147147
IPv4 addresses are placed before IPv6 addresses.
148-
Default: currently `false` (addresses are reordered) but this is expected
148+
**Default:** currently `false` (addresses are reordered) but this is expected
149149
to change in the not too distant future.
150150
New code should use `{ verbatim: true }`.
151151
- `callback` {Function}
@@ -245,7 +245,7 @@ Promise for an object with `hostname` and `service` properties.
245245
added: v0.1.27
246246
-->
247247
- `hostname` {string} Hostname to resolve.
248-
- `rrtype` {string} Resource record type. Default: `'A'`.
248+
- `rrtype` {string} Resource record type. **Default:** `'A'`
249249
- `callback` {Function}
250250
- `err` {Error}
251251
- `records` {string[] | Object[] | Object}

doc/api/http2.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ added: v8.4.0
365365
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
366366
the created stream is made the sole direct dependency of the parent, with
367367
all other existing dependents made a dependent of the newly created stream.
368-
Defaults to `false`.
368+
**Default:** `false`
369369
* `parent` {number} Specifies the numeric identifier of a stream the newly
370370
created stream is dependent on.
371371
* `weight` {number} Specifies the relative dependency of a stream in relation
@@ -415,7 +415,7 @@ added: v8.4.0
415415
-->
416416

417417
* stream {Http2Stream}
418-
* code {number} Unsigned 32-bit integer identifying the error code. Defaults to
418+
* code {number} Unsigned 32-bit integer identifying the error code. **Default:**
419419
`http2.constant.NGHTTP2_NO_ERROR` (`0x00`)
420420
* Returns: {undefined}
421421

@@ -444,7 +444,7 @@ added: v8.4.0
444444
* `graceful` {boolean} `true` to attempt a polite shutdown of the
445445
`Http2Session`.
446446
* `errorCode` {number} The HTTP/2 [error code][] to return. Note that this is
447-
*not* the same thing as an HTTP Response Status Code. Defaults to `0x00`
447+
*not* the same thing as an HTTP Response Status Code. **Default:** `0x00`
448448
(No Error).
449449
* `lastStreamID` {number} The Stream ID of the last successfully processed
450450
`Http2Stream` on this `Http2Session`.
@@ -522,8 +522,8 @@ added: v8.4.0
522522
* `options` {Object}
523523
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
524524
the given stream is made the sole direct dependency of the parent, with
525-
all other existing dependents made a dependent of the given stream. Defaults
526-
to `false`.
525+
all other existing dependents made a dependent of the given stream. **Default:**
526+
`false`
527527
* `parent` {number} Specifies the numeric identifier of a stream the given
528528
stream is dependent on.
529529
* `weight` {number} Specifies the relative dependency of a stream in relation
@@ -734,8 +734,8 @@ added: v8.4.0
734734
* `options` {Object}
735735
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
736736
this stream is made the sole direct dependency of the parent, with
737-
all other existing dependents made a dependent of this stream. Defaults
738-
to `false`.
737+
all other existing dependents made a dependent of this stream. **Default:**
738+
`false`
739739
* `parent` {number} Specifies the numeric identifier of a stream this stream
740740
is dependent on.
741741
* `weight` {number} Specifies the relative dependency of a stream in relation
@@ -764,7 +764,7 @@ calling `http2stream.rstStream()`, or `http2stream.destroy()`. Will be
764764
added: v8.4.0
765765
-->
766766

767-
* code {number} Unsigned 32-bit integer identifying the error code. Defaults to
767+
* code {number} Unsigned 32-bit integer identifying the error code. **Default:**
768768
`http2.constant.NGHTTP2_NO_ERROR` (`0x00`)
769769
* Returns: {undefined}
770770

@@ -986,7 +986,7 @@ added: v8.4.0
986986
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
987987
the created stream is made the sole direct dependency of the parent, with
988988
all other existing dependents made a dependent of the newly created stream.
989-
Defaults to `false`.
989+
**Default:** `false`
990990
* `parent` {number} Specifies the numeric identifier of a stream the newly
991991
created stream is dependent on.
992992
* `callback` {Function} Callback that is called once the push stream has been
@@ -1063,14 +1063,14 @@ fields.
10631063
added: v8.4.0
10641064
-->
10651065

1066-
* `fd` {number} A readable file descriptor
1066+
* `fd` {number} A readable file descriptor.
10671067
* `headers` {[Headers Object][]}
10681068
* `options` {Object}
10691069
* `statCheck` {Function}
10701070
* `getTrailers` {Function} Callback function invoked to collect trailer
10711071
headers.
1072-
* `offset` {number} The offset position at which to begin reading
1073-
* `length` {number} The amount of data from the fd to send
1072+
* `offset` {number} The offset position at which to begin reading.
1073+
* `length` {number} The amount of data from the fd to send.
10741074

10751075
Initiates a response whose data is read from the given file descriptor. No
10761076
validation is performed on the given file descriptor. If an error occurs while
@@ -1152,11 +1152,11 @@ added: v8.4.0
11521152
* `options` {Object}
11531153
* `statCheck` {Function}
11541154
* `onError` {Function} Callback function invoked in the case of an
1155-
Error before send
1155+
Error before send.
11561156
* `getTrailers` {Function} Callback function invoked to collect trailer
11571157
headers.
1158-
* `offset` {number} The offset position at which to begin reading
1159-
* `length` {number} The amount of data from the fd to send
1158+
* `offset` {number} The offset position at which to begin reading.
1159+
* `length` {number} The amount of data from the fd to send.
11601160

11611161
Sends a regular file as the response. The `path` must specify a regular file
11621162
or an `'error'` event will be emitted on the `Http2Stream` object.
@@ -1474,13 +1474,13 @@ added: v8.4.0
14741474

14751475
* `options` {Object}
14761476
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
1477-
for deflating header fields. Defaults to 4Kib.
1477+
for deflating header fields. **Default:** `4Kib`
14781478
* `maxSendHeaderBlockLength` {number} Sets the maximum allowed size for a
14791479
serialized, compressed block of headers. Attempts to send headers that
14801480
exceed this limit will result in a `'frameError'` event being emitted
14811481
and the stream being closed and destroyed.
14821482
* `paddingStrategy` {number} Identifies the strategy used for determining the
1483-
amount of padding to use for HEADERS and DATA frames. Defaults to
1483+
amount of padding to use for HEADERS and DATA frames. **Default:**
14841484
`http2.constants.PADDING_STRATEGY_NONE`. Value may be one of:
14851485
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
14861486
to be applied.
@@ -1492,8 +1492,8 @@ added: v8.4.0
14921492
amount of padding.
14931493
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
14941494
streams for the remote peer as if a SETTINGS frame had been received. Will
1495-
be overridden if the remote peer sets its own value for
1496-
`maxConcurrentStreams`. Defaults to 100.
1495+
be overridden if the remote peer sets its own value for.
1496+
`maxConcurrentStreams`. **Default** `100`
14971497
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
14981498
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
14991499
used to determine the padding. See [Using options.selectPadding][].
@@ -1529,16 +1529,16 @@ added: v8.4.0
15291529

15301530
* `options` {Object}
15311531
* `allowHTTP1` {boolean} Incoming client connections that do not support
1532-
HTTP/2 will be downgraded to HTTP/1.x when set to `true`. The default value
1533-
is `false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
1532+
HTTP/2 will be downgraded to HTTP/1.x when set to `true`. **Default:**
1533+
`false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
15341534
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
1535-
for deflating header fields. Defaults to 4Kib.
1535+
for deflating header fields. **Default:** `4Kib`
15361536
* `maxSendHeaderBlockLength` {number} Sets the maximum allowed size for a
15371537
serialized, compressed block of headers. Attempts to send headers that
15381538
exceed this limit will result in a `'frameError'` event being emitted
15391539
and the stream being closed and destroyed.
15401540
* `paddingStrategy` {number} Identifies the strategy used for determining the
1541-
amount of padding to use for HEADERS and DATA frames. Defaults to
1541+
amount of padding to use for HEADERS and DATA frames. **Default:**
15421542
`http2.constants.PADDING_STRATEGY_NONE`. Value may be one of:
15431543
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
15441544
to be applied.
@@ -1551,7 +1551,7 @@ added: v8.4.0
15511551
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
15521552
streams for the remote peer as if a SETTINGS frame had been received. Will
15531553
be overridden if the remote peer sets its own value for
1554-
`maxConcurrentStreams`. Defaults to 100.
1554+
`maxConcurrentStreams`. **Default:** `100`
15551555
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
15561556
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
15571557
used to determine the padding. See [Using options.selectPadding][].
@@ -1595,7 +1595,7 @@ added: v8.4.0
15951595
* `authority` {string|URL}
15961596
* `options` {Object}
15971597
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
1598-
for deflating header fields. Defaults to 4Kib.
1598+
for deflating header fields. **Default:** `4Kib`
15991599
* `maxReservedRemoteStreams` {number} Sets the maximum number of reserved push
16001600
streams the client will accept at any given time. Once the current number of
16011601
currently reserved push streams exceeds reaches this limit, new push streams
@@ -1605,7 +1605,7 @@ added: v8.4.0
16051605
exceed this limit will result in a `'frameError'` event being emitted
16061606
and the stream being closed and destroyed.
16071607
* `paddingStrategy` {number} Identifies the strategy used for determining the
1608-
amount of padding to use for HEADERS and DATA frames. Defaults to
1608+
amount of padding to use for HEADERS and DATA frames. **Default:**
16091609
`http2.constants.PADDING_STRATEGY_NONE`. Value may be one of:
16101610
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
16111611
to be applied.
@@ -1618,7 +1618,7 @@ added: v8.4.0
16181618
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
16191619
streams for the remote peer as if a SETTINGS frame had been received. Will
16201620
be overridden if the remote peer sets its own value for
1621-
`maxConcurrentStreams`. Defaults to 100.
1621+
`maxConcurrentStreams`. **Default:** `100`
16221622
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
16231623
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
16241624
used to determine the padding. See [Using options.selectPadding][].
@@ -1707,7 +1707,7 @@ console.log(packed.toString('base64'));
17071707
added: v8.4.0
17081708
-->
17091709

1710-
* `buf` {Buffer|Uint8Array} The packed settings
1710+
* `buf` {Buffer|Uint8Array} The packed settings.
17111711
* Returns: {[Settings Object][]}
17121712

17131713
Returns a [Settings Object][] containing the deserialized settings from the
@@ -1757,15 +1757,15 @@ These objects are ordinary JavaScript objects containing the following
17571757
properties.
17581758

17591759
* `headerTableSize` {number} Specifies the maximum number of bytes used for
1760-
header compression. The default value is 4,096 octets. The minimum allowed
1760+
header compression. **Default:** `4,096 octets`. The minimum allowed
17611761
value is 0. The maximum allowed value is 2<sup>32</sup>-1.
17621762
* `enablePush` {boolean} Specifies `true` if HTTP/2 Push Streams are to be
17631763
permitted on the `Http2Session` instances.
17641764
* `initialWindowSize` {number} Specifies the *senders* initial window size
1765-
for stream-level flow control. The default value is 65,535 bytes. The minimum
1765+
for stream-level flow control. **Default:** `65,535 bytes`. The minimum
17661766
allowed value is 0. The maximum allowed value is 2<sup>32</sup>-1.
17671767
* `maxFrameSize` {number} Specifies the size of the largest frame payload.
1768-
The default and the minimum allowed value is 16,384 bytes. The maximum
1768+
**Default:** `16,384 bytes`. The minimum allowed value is 16,384. The maximum
17691769
allowed value is 2<sup>24</sup>-1.
17701770
* `maxConcurrentStreams` {number} Specifies the maximum number of concurrent
17711771
streams permitted on an `Http2Session`. There is no default value which
@@ -2478,7 +2478,7 @@ added: v8.4.0
24782478
-->
24792479

24802480
* `name` {string}
2481-
* `value` {string | string[]}
2481+
* `value` {string|string[]}
24822482

24832483
Sets a single header value for implicit headers. If this header already exists
24842484
in the to-be-sent headers, its value will be replaced. Use an array of strings

doc/api/net.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ added: v0.11.14
250250
* `path` {string} Will be ignored if `port` is specified. See
251251
[Identifying paths for IPC connections][].
252252
* `backlog` {number} Common parameter of [`server.listen()`][]
253-
functions
254-
* `exclusive` {boolean} Default to `false`
253+
functions.
254+
* `exclusive` {boolean} **Default:** `false`
255255
* `callback` {Function} Common parameter of [`server.listen()`][]
256-
functions
256+
functions.
257257
* Returns: {net.Server}
258258

259259
If `port` is specified, it behaves the same as
@@ -283,8 +283,8 @@ added: v0.1.90
283283

284284
* `path` {String} Path the server should listen to. See
285285
[Identifying paths for IPC connections][].
286-
* `backlog` {number} Common parameter of [`server.listen()`][] functions
287-
* `callback` {Function} Common parameter of [`server.listen()`][] functions
286+
* `backlog` {number} Common parameter of [`server.listen()`][] functions.
287+
* `callback` {Function} Common parameter of [`server.listen()`][] functions.
288288
* Returns: {net.Server}
289289

290290
Start a [IPC][] server listening for connections on the given `path`.
@@ -295,8 +295,8 @@ added: v0.1.90
295295
-->
296296
* `port` {number}
297297
* `host` {string}
298-
* `backlog` {number} Common parameter of [`server.listen()`][] functions
299-
* `callback` {Function} Common parameter of [`server.listen()`][] functions
298+
* `backlog` {number} Common parameter of [`server.listen()`][] functions.
299+
* `callback` {Function} Common parameter of [`server.listen()`][] functions.
300300
* Returns: {net.Server}
301301

302302
Start a TCP server listening for connections on the given `port` and `host`.
@@ -385,11 +385,11 @@ Creates a new socket object.
385385
the given file descriptor, otherwise a new socket will be created.
386386
* `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections
387387
are allowed. See [`net.createServer()`][] and the [`'end'`][] event
388-
for details. Defaults to `false`.
388+
for details. **Default:** `false`
389389
* `readable` {boolean} Allow reads on the socket when an `fd` is passed,
390-
otherwise ignored. Defaults to `false`.
390+
otherwise ignored. **Default:** `false`
391391
* `writable` {boolean} Allow writes on the socket when an `fd` is passed,
392-
otherwise ignored. Defaults to `false`.
392+
otherwise ignored. **Default:** `false`
393393
* Returns: {net.Socket}
394394

395395
The newly created socket can be either a TCP socket or a streaming [IPC][]
@@ -581,12 +581,12 @@ this only when implementing a custom Socket.
581581
For TCP connections, available `options` are:
582582

583583
* `port` {number} Required. Port the socket should connect to.
584-
* `host` {string} Host the socket should connect to. Defaults to `'localhost'`.
584+
* `host` {string} Host the socket should connect to. **Default:** `'localhost'`
585585
* `localAddress` {string} Local address the socket should connect from.
586586
* `localPort` {number} Local port the socket should connect from.
587-
* `family` {number}: Version of IP stack, can be either 4 or 6. Defaults to 4.
587+
* `family` {number}: Version of IP stack, can be either 4 or 6. **Default:** `4`
588588
* `hints` {number} Optional [`dns.lookup()` hints][].
589-
* `lookup` {Function} Custom lookup function. Defaults to [`dns.lookup()`][].
589+
* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][]
590590

591591
For [IPC][] connections, available `options` are:
592592

@@ -965,9 +965,9 @@ added: v0.1.90
965965

966966
* `port` {number} Port the socket should connect to. Will be passed to
967967
[`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`].
968-
* `host` {string} Host the socket should connect to. Defaults to `'localhost'`.
969-
Will be passed to
968+
* `host` {string} Host the socket should connect to. Will be passed to
970969
[`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`].
970+
**Default:** `'localhost'`
971971
* `connectListener` {Function} Common parameter of the
972972
[`net.createConnection()`][] functions, an "once" listener for the
973973
`'connect'` event on the initiating socket. Will be passed to
@@ -989,12 +989,12 @@ added: v0.5.0
989989
Creates a new TCP or [IPC][] server.
990990

991991
* `options` {Object}
992-
* `allowHalfOpen` {boolean} Default to `false`. Indicates whether half-opened
993-
TCP connections are allowed.
994-
* `pauseOnConnect` {boolean} Default to `false`. Indicates whether the socket
995-
should be paused on incoming connections.
992+
* `allowHalfOpen` {boolean} Indicates whether half-opened TCP
993+
connections are allowed. **Default:** `false`
994+
* `pauseOnConnect` {boolean} Indicates whether the socket should be
995+
paused on incoming connections. **Default:** `false`
996996
* `connectionListener` {Function} Automatically set as a listener for the
997-
[`'connection'`][] event
997+
[`'connection'`][] event.
998998
* Returns: {net.Server}
999999

10001000
If `allowHalfOpen` is set to `true`, when the other end of the socket

doc/api/os.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ added: v6.0.0
401401
* `options` {Object}
402402
* `encoding` {string} Character encoding used to interpret resulting strings.
403403
If `encoding` is set to `'buffer'`, the `username`, `shell`, and `homedir`
404-
values will be `Buffer` instances. (Default: 'utf8')
404+
values will be `Buffer` instances. **Default:** `'utf8'`
405405
* Returns: {Object}
406406

407407
The `os.userInfo()` method returns information about the currently effective

0 commit comments

Comments
 (0)