Skip to content

Commit

Permalink
doc: make default values and periods consistent
Browse files Browse the repository at this point in the history
PR-URL: #16563
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
matejkrajcovic authored and gibfahn committed Oct 30, 2017
1 parent 9805c3d commit 4f83169
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 69 deletions.
4 changes: 2 additions & 2 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,8 @@ changes:

* {Object}
* `execArgv` {Array} List of string arguments passed to the Node.js
executable. (Default=`process.execArgv`)
* `exec` {string} File path to worker file. (Default=`process.argv[1]`)
executable. **Default:** `process.execArgv`
* `exec` {string} File path to worker file. **Default:** `process.argv[1]`
* `args` {Array} String arguments passed to worker.
**Default:** `process.argv.slice(2)`
* `silent` {boolean} Whether or not to send output to parent's stdio.
Expand Down
6 changes: 3 additions & 3 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ changes:
- `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
flags may be passed by bitwise `OR`ing their values.
- `all` {boolean} When `true`, the callback returns all resolved addresses in
an array. Otherwise, returns a single address. Defaults to `false`.
an array. Otherwise, returns a single address. **Default:** `false`
- `verbatim` {boolean} When `true`, the callback receives IPv4 and IPv6
addresses in the order the DNS resolver returned them. When `false`,
IPv4 addresses are placed before IPv6 addresses.
Default: currently `false` (addresses are reordered) but this is expected
**Default:** currently `false` (addresses are reordered) but this is expected
to change in the not too distant future.
New code should use `{ verbatim: true }`.
- `callback` {Function}
Expand Down Expand Up @@ -245,7 +245,7 @@ Promise for an object with `hostname` and `service` properties.
added: v0.1.27
-->
- `hostname` {string} Hostname to resolve.
- `rrtype` {string} Resource record type. Default: `'A'`.
- `rrtype` {string} Resource record type. **Default:** `'A'`
- `callback` {Function}
- `err` {Error}
- `records` {string[] | Object[] | Object}
Expand Down
64 changes: 32 additions & 32 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ added: v8.4.0
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
the created stream is made the sole direct dependency of the parent, with
all other existing dependents made a dependent of the newly created stream.
Defaults to `false`.
**Default:** `false`
* `parent` {number} Specifies the numeric identifier of a stream the newly
created stream is dependent on.
* `weight` {number} Specifies the relative dependency of a stream in relation
Expand Down Expand Up @@ -415,7 +415,7 @@ added: v8.4.0
-->

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

Expand Down Expand Up @@ -444,7 +444,7 @@ added: v8.4.0
* `graceful` {boolean} `true` to attempt a polite shutdown of the
`Http2Session`.
* `errorCode` {number} The HTTP/2 [error code][] to return. Note that this is
*not* the same thing as an HTTP Response Status Code. Defaults to `0x00`
*not* the same thing as an HTTP Response Status Code. **Default:** `0x00`
(No Error).
* `lastStreamID` {number} The Stream ID of the last successfully processed
`Http2Stream` on this `Http2Session`.
Expand Down Expand Up @@ -522,8 +522,8 @@ added: v8.4.0
* `options` {Object}
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
the given stream is made the sole direct dependency of the parent, with
all other existing dependents made a dependent of the given stream. Defaults
to `false`.
all other existing dependents made a dependent of the given stream. **Default:**
`false`
* `parent` {number} Specifies the numeric identifier of a stream the given
stream is dependent on.
* `weight` {number} Specifies the relative dependency of a stream in relation
Expand Down Expand Up @@ -734,8 +734,8 @@ added: v8.4.0
* `options` {Object}
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
this stream is made the sole direct dependency of the parent, with
all other existing dependents made a dependent of this stream. Defaults
to `false`.
all other existing dependents made a dependent of this stream. **Default:**
`false`
* `parent` {number} Specifies the numeric identifier of a stream this stream
is dependent on.
* `weight` {number} Specifies the relative dependency of a stream in relation
Expand Down Expand Up @@ -764,7 +764,7 @@ calling `http2stream.rstStream()`, or `http2stream.destroy()`. Will be
added: v8.4.0
-->

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

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

* `fd` {number} A readable file descriptor
* `fd` {number} A readable file descriptor.
* `headers` {[Headers Object][]}
* `options` {Object}
* `statCheck` {Function}
* `getTrailers` {Function} Callback function invoked to collect trailer
headers.
* `offset` {number} The offset position at which to begin reading
* `length` {number} The amount of data from the fd to send
* `offset` {number} The offset position at which to begin reading.
* `length` {number} The amount of data from the fd to send.

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

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

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

* `options` {Object}
* `allowHTTP1` {boolean} Incoming client connections that do not support
HTTP/2 will be downgraded to HTTP/1.x when set to `true`. The default value
is `false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
HTTP/2 will be downgraded to HTTP/1.x when set to `true`. **Default:**
`false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
for deflating header fields. Defaults to 4Kib.
for deflating header fields. **Default:** `4Kib`
* `maxSendHeaderBlockLength` {number} Sets the maximum allowed size for a
serialized, compressed block of headers. Attempts to send headers that
exceed this limit will result in a `'frameError'` event being emitted
and the stream being closed and destroyed.
* `paddingStrategy` {number} Identifies the strategy used for determining the
amount of padding to use for HEADERS and DATA frames. Defaults to
amount of padding to use for HEADERS and DATA frames. **Default:**
`http2.constants.PADDING_STRATEGY_NONE`. Value may be one of:
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
to be applied.
Expand All @@ -1551,7 +1551,7 @@ added: v8.4.0
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
streams for the remote peer as if a SETTINGS frame had been received. Will
be overridden if the remote peer sets its own value for
`maxConcurrentStreams`. Defaults to 100.
`maxConcurrentStreams`. **Default:** `100`
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
used to determine the padding. See [Using options.selectPadding][].
Expand Down Expand Up @@ -1595,7 +1595,7 @@ added: v8.4.0
* `authority` {string|URL}
* `options` {Object}
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
for deflating header fields. Defaults to 4Kib.
for deflating header fields. **Default:** `4Kib`
* `maxReservedRemoteStreams` {number} Sets the maximum number of reserved push
streams the client will accept at any given time. Once the current number of
currently reserved push streams exceeds reaches this limit, new push streams
Expand All @@ -1605,7 +1605,7 @@ added: v8.4.0
exceed this limit will result in a `'frameError'` event being emitted
and the stream being closed and destroyed.
* `paddingStrategy` {number} Identifies the strategy used for determining the
amount of padding to use for HEADERS and DATA frames. Defaults to
amount of padding to use for HEADERS and DATA frames. **Default:**
`http2.constants.PADDING_STRATEGY_NONE`. Value may be one of:
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
to be applied.
Expand All @@ -1618,7 +1618,7 @@ added: v8.4.0
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
streams for the remote peer as if a SETTINGS frame had been received. Will
be overridden if the remote peer sets its own value for
`maxConcurrentStreams`. Defaults to 100.
`maxConcurrentStreams`. **Default:** `100`
* `selectPadding` {Function} When `options.paddingStrategy` is equal to
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
used to determine the padding. See [Using options.selectPadding][].
Expand Down Expand Up @@ -1707,7 +1707,7 @@ console.log(packed.toString('base64'));
added: v8.4.0
-->

* `buf` {Buffer|Uint8Array} The packed settings
* `buf` {Buffer|Uint8Array} The packed settings.
* Returns: {[Settings Object][]}

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

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

* `name` {string}
* `value` {string | string[]}
* `value` {string|string[]}

Sets a single header value for implicit headers. If this header already exists
in the to-be-sent headers, its value will be replaced. Use an array of strings
Expand Down
40 changes: 20 additions & 20 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ added: v0.11.14
* `path` {string} Will be ignored if `port` is specified. See
[Identifying paths for IPC connections][].
* `backlog` {number} Common parameter of [`server.listen()`][]
functions
* `exclusive` {boolean} Default to `false`
functions.
* `exclusive` {boolean} **Default:** `false`
* `callback` {Function} Common parameter of [`server.listen()`][]
functions
functions.
* Returns: {net.Server}

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

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

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

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

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

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

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

Expand Down Expand Up @@ -965,9 +965,9 @@ added: v0.1.90

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

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

If `allowHalfOpen` is set to `true`, when the other end of the socket
Expand Down
2 changes: 1 addition & 1 deletion doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ added: v6.0.0
* `options` {Object}
* `encoding` {string} Character encoding used to interpret resulting strings.
If `encoding` is set to `'buffer'`, the `username`, `shell`, and `homedir`
values will be `Buffer` instances. (Default: 'utf8')
values will be `Buffer` instances. **Default:** `'utf8'`
* Returns: {Object}

The `os.userInfo()` method returns information about the currently effective
Expand Down
Loading

0 comments on commit 4f83169

Please sign in to comment.