doc: make default values and periods consistent

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Matej Krajčovič 2017-10-27 21:51:28 +02:00 committed by Tobias Nießen
parent 390eda100d
commit 571c04b07a
No known key found for this signature in database
GPG Key ID: 718207F8FD156B70
6 changed files with 68 additions and 69 deletions

View File

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

View File

@ -141,11 +141,11 @@ changes:
- `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple - `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
flags may be passed by bitwise `OR`ing their values. flags may be passed by bitwise `OR`ing their values.
- `all` {boolean} When `true`, the callback returns all resolved addresses in - `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 - `verbatim` {boolean} When `true`, the callback receives IPv4 and IPv6
addresses in the order the DNS resolver returned them. When `false`, addresses in the order the DNS resolver returned them. When `false`,
IPv4 addresses are placed before IPv6 addresses. 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. to change in the not too distant future.
New code should use `{ verbatim: true }`. New code should use `{ verbatim: true }`.
- `callback` {Function} - `callback` {Function}
@ -245,7 +245,7 @@ Promise for an object with `hostname` and `service` properties.
added: v0.1.27 added: v0.1.27
--> -->
- `hostname` {string} Hostname to resolve. - `hostname` {string} Hostname to resolve.
- `rrtype` {string} Resource record type. Default: `'A'`. - `rrtype` {string} Resource record type. **Default:** `'A'`
- `callback` {Function} - `callback` {Function}
- `err` {Error} - `err` {Error}
- `records` {string[] | Object[] | Object} - `records` {string[] | Object[] | Object}

View File

@ -365,7 +365,7 @@ added: v8.4.0
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream, * `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
the created stream is made the sole direct dependency of the parent, with 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. 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 * `parent` {number} Specifies the numeric identifier of a stream the newly
created stream is dependent on. created stream is dependent on.
* `weight` {number} Specifies the relative dependency of a stream in relation * `weight` {number} Specifies the relative dependency of a stream in relation
@ -415,7 +415,7 @@ added: v8.4.0
--> -->
* stream {Http2Stream} * 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`) `http2.constant.NGHTTP2_NO_ERROR` (`0x00`)
* Returns: {undefined} * Returns: {undefined}
@ -444,7 +444,7 @@ added: v8.4.0
* `graceful` {boolean} `true` to attempt a polite shutdown of the * `graceful` {boolean} `true` to attempt a polite shutdown of the
`Http2Session`. `Http2Session`.
* `errorCode` {number} The HTTP/2 [error code][] to return. Note that this is * `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). (No Error).
* `lastStreamID` {number} The Stream ID of the last successfully processed * `lastStreamID` {number} The Stream ID of the last successfully processed
`Http2Stream` on this `Http2Session`. `Http2Stream` on this `Http2Session`.
@ -522,8 +522,8 @@ added: v8.4.0
* `options` {Object} * `options` {Object}
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream, * `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
the given stream is made the sole direct dependency of the parent, with 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 all other existing dependents made a dependent of the given stream. **Default:**
to `false`. `false`
* `parent` {number} Specifies the numeric identifier of a stream the given * `parent` {number} Specifies the numeric identifier of a stream the given
stream is dependent on. stream is dependent on.
* `weight` {number} Specifies the relative dependency of a stream in relation * `weight` {number} Specifies the relative dependency of a stream in relation
@ -734,8 +734,8 @@ added: v8.4.0
* `options` {Object} * `options` {Object}
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream, * `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
this stream is made the sole direct dependency of the parent, with this stream is made the sole direct dependency of the parent, with
all other existing dependents made a dependent of this stream. Defaults all other existing dependents made a dependent of this stream. **Default:**
to `false`. `false`
* `parent` {number} Specifies the numeric identifier of a stream this stream * `parent` {number} Specifies the numeric identifier of a stream this stream
is dependent on. is dependent on.
* `weight` {number} Specifies the relative dependency of a stream in relation * `weight` {number} Specifies the relative dependency of a stream in relation
@ -764,7 +764,7 @@ calling `http2stream.rstStream()`, or `http2stream.destroy()`. Will be
added: v8.4.0 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`) `http2.constant.NGHTTP2_NO_ERROR` (`0x00`)
* Returns: {undefined} * Returns: {undefined}
@ -986,7 +986,7 @@ added: v8.4.0
* `exclusive` {boolean} When `true` and `parent` identifies a parent Stream, * `exclusive` {boolean} When `true` and `parent` identifies a parent Stream,
the created stream is made the sole direct dependency of the parent, with 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. 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 * `parent` {number} Specifies the numeric identifier of a stream the newly
created stream is dependent on. created stream is dependent on.
* `callback` {Function} Callback that is called once the push stream has been * `callback` {Function} Callback that is called once the push stream has been
@ -1063,14 +1063,14 @@ fields.
added: v8.4.0 added: v8.4.0
--> -->
* `fd` {number} A readable file descriptor * `fd` {number} A readable file descriptor.
* `headers` {[Headers Object][]} * `headers` {[Headers Object][]}
* `options` {Object} * `options` {Object}
* `statCheck` {Function} * `statCheck` {Function}
* `getTrailers` {Function} Callback function invoked to collect trailer * `getTrailers` {Function} Callback function invoked to collect trailer
headers. headers.
* `offset` {number} The offset position at which to begin reading * `offset` {number} The offset position at which to begin reading.
* `length` {number} The amount of data from the fd to send * `length` {number} The amount of data from the fd to send.
Initiates a response whose data is read from the given file descriptor. No 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 validation is performed on the given file descriptor. If an error occurs while
@ -1152,11 +1152,11 @@ added: v8.4.0
* `options` {Object} * `options` {Object}
* `statCheck` {Function} * `statCheck` {Function}
* `onError` {Function} Callback function invoked in the case of an * `onError` {Function} Callback function invoked in the case of an
Error before send Error before send.
* `getTrailers` {Function} Callback function invoked to collect trailer * `getTrailers` {Function} Callback function invoked to collect trailer
headers. headers.
* `offset` {number} The offset position at which to begin reading * `offset` {number} The offset position at which to begin reading.
* `length` {number} The amount of data from the fd to send * `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 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. or an `'error'` event will be emitted on the `Http2Stream` object.
@ -1474,13 +1474,13 @@ added: v8.4.0
* `options` {Object} * `options` {Object}
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size * `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 * `maxSendHeaderBlockLength` {number} Sets the maximum allowed size for a
serialized, compressed block of headers. Attempts to send headers that serialized, compressed block of headers. Attempts to send headers that
exceed this limit will result in a `'frameError'` event being emitted exceed this limit will result in a `'frameError'` event being emitted
and the stream being closed and destroyed. and the stream being closed and destroyed.
* `paddingStrategy` {number} Identifies the strategy used for determining the * `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`. Value may be one of:
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is * `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
to be applied. to be applied.
@ -1492,8 +1492,8 @@ added: v8.4.0
amount of padding. amount of padding.
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent * `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
streams for the remote peer as if a SETTINGS frame had been received. Will 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 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 * `selectPadding` {Function} When `options.paddingStrategy` is equal to
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function `http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
used to determine the padding. See [Using options.selectPadding][]. used to determine the padding. See [Using options.selectPadding][].
@ -1529,16 +1529,16 @@ added: v8.4.0
* `options` {Object} * `options` {Object}
* `allowHTTP1` {boolean} Incoming client connections that do not support * `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 HTTP/2 will be downgraded to HTTP/1.x when set to `true`. **Default:**
is `false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][]. `false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size * `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 * `maxSendHeaderBlockLength` {number} Sets the maximum allowed size for a
serialized, compressed block of headers. Attempts to send headers that serialized, compressed block of headers. Attempts to send headers that
exceed this limit will result in a `'frameError'` event being emitted exceed this limit will result in a `'frameError'` event being emitted
and the stream being closed and destroyed. and the stream being closed and destroyed.
* `paddingStrategy` {number} Identifies the strategy used for determining the * `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`. Value may be one of:
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is * `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
to be applied. to be applied.
@ -1551,7 +1551,7 @@ added: v8.4.0
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent * `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
streams for the remote peer as if a SETTINGS frame had been received. Will 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 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 * `selectPadding` {Function} When `options.paddingStrategy` is equal to
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function `http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
used to determine the padding. See [Using options.selectPadding][]. used to determine the padding. See [Using options.selectPadding][].
@ -1595,7 +1595,7 @@ added: v8.4.0
* `authority` {string|URL} * `authority` {string|URL}
* `options` {Object} * `options` {Object}
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size * `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 * `maxReservedRemoteStreams` {number} Sets the maximum number of reserved push
streams the client will accept at any given time. Once the current number of 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 currently reserved push streams exceeds reaches this limit, new push streams
@ -1605,7 +1605,7 @@ added: v8.4.0
exceed this limit will result in a `'frameError'` event being emitted exceed this limit will result in a `'frameError'` event being emitted
and the stream being closed and destroyed. and the stream being closed and destroyed.
* `paddingStrategy` {number} Identifies the strategy used for determining the * `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`. Value may be one of:
* `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is * `http2.constants.PADDING_STRATEGY_NONE` - Specifies that no padding is
to be applied. to be applied.
@ -1618,7 +1618,7 @@ added: v8.4.0
* `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent * `peerMaxConcurrentStreams` {number} Sets the maximum number of concurrent
streams for the remote peer as if a SETTINGS frame had been received. Will 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 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 * `selectPadding` {Function} When `options.paddingStrategy` is equal to
`http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function `http2.constants.PADDING_STRATEGY_CALLBACK`, provides the callback function
used to determine the padding. See [Using options.selectPadding][]. used to determine the padding. See [Using options.selectPadding][].
@ -1707,7 +1707,7 @@ console.log(packed.toString('base64'));
added: v8.4.0 added: v8.4.0
--> -->
* `buf` {Buffer|Uint8Array} The packed settings * `buf` {Buffer|Uint8Array} The packed settings.
* Returns: {[Settings Object][]} * Returns: {[Settings Object][]}
Returns a [Settings Object][] containing the deserialized settings from the Returns a [Settings Object][] containing the deserialized settings from the
@ -1757,15 +1757,15 @@ These objects are ordinary JavaScript objects containing the following
properties. properties.
* `headerTableSize` {number} Specifies the maximum number of bytes used for * `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. 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 * `enablePush` {boolean} Specifies `true` if HTTP/2 Push Streams are to be
permitted on the `Http2Session` instances. permitted on the `Http2Session` instances.
* `initialWindowSize` {number} Specifies the *senders* initial window size * `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. allowed value is 0. The maximum allowed value is 2<sup>32</sup>-1.
* `maxFrameSize` {number} Specifies the size of the largest frame payload. * `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. allowed value is 2<sup>24</sup>-1.
* `maxConcurrentStreams` {number} Specifies the maximum number of concurrent * `maxConcurrentStreams` {number} Specifies the maximum number of concurrent
streams permitted on an `Http2Session`. There is no default value which streams permitted on an `Http2Session`. There is no default value which
@ -2478,7 +2478,7 @@ added: v8.4.0
--> -->
* `name` {string} * `name` {string}
* `value` {string | string[]} * `value` {string|string[]}
Sets a single header value for implicit headers. If this header already exists 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 in the to-be-sent headers, its value will be replaced. Use an array of strings

View File

@ -250,10 +250,10 @@ added: v0.11.14
* `path` {string} Will be ignored if `port` is specified. See * `path` {string} Will be ignored if `port` is specified. See
[Identifying paths for IPC connections][]. [Identifying paths for IPC connections][].
* `backlog` {number} Common parameter of [`server.listen()`][] * `backlog` {number} Common parameter of [`server.listen()`][]
functions functions.
* `exclusive` {boolean} Default to `false` * `exclusive` {boolean} **Default:** `false`
* `callback` {Function} Common parameter of [`server.listen()`][] * `callback` {Function} Common parameter of [`server.listen()`][]
functions functions.
* Returns: {net.Server} * Returns: {net.Server}
If `port` is specified, it behaves the same as If `port` is specified, it behaves the same as
@ -283,8 +283,8 @@ added: v0.1.90
* `path` {String} Path the server should listen to. See * `path` {String} Path the server should listen to. See
[Identifying paths for IPC connections][]. [Identifying paths for IPC connections][].
* `backlog` {number} Common parameter of [`server.listen()`][] functions * `backlog` {number} Common parameter of [`server.listen()`][] functions.
* `callback` {Function} Common parameter of [`server.listen()`][] functions * `callback` {Function} Common parameter of [`server.listen()`][] functions.
* Returns: {net.Server} * Returns: {net.Server}
Start a [IPC][] server listening for connections on the given `path`. Start a [IPC][] server listening for connections on the given `path`.
@ -295,8 +295,8 @@ added: v0.1.90
--> -->
* `port` {number} * `port` {number}
* `host` {string} * `host` {string}
* `backlog` {number} Common parameter of [`server.listen()`][] functions * `backlog` {number} Common parameter of [`server.listen()`][] functions.
* `callback` {Function} Common parameter of [`server.listen()`][] functions * `callback` {Function} Common parameter of [`server.listen()`][] functions.
* Returns: {net.Server} * Returns: {net.Server}
Start a TCP server listening for connections on the given `port` and `host`. Start a TCP server listening for connections on the given `port` and `host`.
@ -385,11 +385,11 @@ Creates a new socket object.
the given file descriptor, otherwise a new socket will be created. the given file descriptor, otherwise a new socket will be created.
* `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections * `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections
are allowed. See [`net.createServer()`][] and the [`'end'`][] event 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, * `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, * `writable` {boolean} Allow writes on the socket when an `fd` is passed,
otherwise ignored. Defaults to `false`. otherwise ignored. **Default:** `false`
* Returns: {net.Socket} * Returns: {net.Socket}
The newly created socket can be either a TCP socket or a streaming [IPC][] 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.
For TCP connections, available `options` are: For TCP connections, available `options` are:
* `port` {number} Required. Port the socket should connect to. * `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. * `localAddress` {string} Local address the socket should connect from.
* `localPort` {number} Local port 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][]. * `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: For [IPC][] connections, available `options` are:
@ -965,9 +965,9 @@ added: v0.1.90
* `port` {number} Port the socket should connect to. Will be passed to * `port` {number} Port the socket should connect to. Will be passed to
[`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`]. [`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`].
* `host` {string} Host the socket should connect to. Defaults to `'localhost'`. * `host` {string} Host the socket should connect to. Will be passed to
Will be passed to
[`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`]. [`socket.connect(port[, host][, connectListener])`][`socket.connect(port, host)`].
**Default:** `'localhost'`
* `connectListener` {Function} Common parameter of the * `connectListener` {Function} Common parameter of the
[`net.createConnection()`][] functions, an "once" listener for the [`net.createConnection()`][] functions, an "once" listener for the
`'connect'` event on the initiating socket. Will be passed to `'connect'` event on the initiating socket. Will be passed to
@ -989,12 +989,12 @@ added: v0.5.0
Creates a new TCP or [IPC][] server. Creates a new TCP or [IPC][] server.
* `options` {Object} * `options` {Object}
* `allowHalfOpen` {boolean} Default to `false`. Indicates whether half-opened * `allowHalfOpen` {boolean} Indicates whether half-opened TCP
TCP connections are allowed. connections are allowed. **Default:** `false`
* `pauseOnConnect` {boolean} Default to `false`. Indicates whether the socket * `pauseOnConnect` {boolean} Indicates whether the socket should be
should be paused on incoming connections. paused on incoming connections. **Default:** `false`
* `connectionListener` {Function} Automatically set as a listener for the * `connectionListener` {Function} Automatically set as a listener for the
[`'connection'`][] event [`'connection'`][] event.
* Returns: {net.Server} * Returns: {net.Server}
If `allowHalfOpen` is set to `true`, when the other end of the socket If `allowHalfOpen` is set to `true`, when the other end of the socket

View File

@ -401,7 +401,7 @@ added: v6.0.0
* `options` {Object} * `options` {Object}
* `encoding` {string} Character encoding used to interpret resulting strings. * `encoding` {string} Character encoding used to interpret resulting strings.
If `encoding` is set to `'buffer'`, the `username`, `shell`, and `homedir` 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} * Returns: {Object}
The `os.userInfo()` method returns information about the currently effective The `os.userInfo()` method returns information about the currently effective

View File

@ -369,21 +369,20 @@ changes:
* `terminal` {boolean} `true` if the `input` and `output` streams should be * `terminal` {boolean} `true` if the `input` and `output` streams should be
treated like a TTY, and have ANSI/VT100 escape codes written to it. treated like a TTY, and have ANSI/VT100 escape codes written to it.
Defaults to checking `isTTY` on the `output` stream upon instantiation. Defaults to checking `isTTY` on the `output` stream upon instantiation.
* `historySize` {number} maximum number of history lines retained. To disable * `historySize` {number} Maximum number of history lines retained. To disable
the history set this value to `0`. Defaults to `30`. This option makes sense the history set this value to `0`. This option makes sense only if `terminal`
only if `terminal` is set to `true` by the user or by an internal `output` is set to `true` by the user or by an internal `output` check, otherwise the
check, otherwise the history caching mechanism is not initialized at all. history caching mechanism is not initialized at all. **Default:** `30`
* `prompt` - the prompt string to use. Default: `'> '` * `prompt` {string} The prompt string to use. **Default:** `'> '`
* `crlfDelay` {number} If the delay between `\r` and `\n` exceeds * `crlfDelay` {number} If the delay between `\r` and `\n` exceeds
`crlfDelay` milliseconds, both `\r` and `\n` will be treated as separate `crlfDelay` milliseconds, both `\r` and `\n` will be treated as separate
end-of-line input. Default to `100` milliseconds. end-of-line input. `crlfDelay` will be coerced to a number no less than `100`.
`crlfDelay` will be coerced to a number no less than `100`. It can be set to It can be set to `Infinity`, in which case `\r` followed by `\n` will always be
`Infinity`, in which case `\r` followed by `\n` will always be considered a considered a single newline (which may be reasonable for [reading files][]
single newline (which may be reasonable for [reading files][] with `\r\n` with `\r\n` line delimiter). **Default:** `100`
line delimiter).
* `removeHistoryDuplicates` {boolean} If `true`, when a new input line added * `removeHistoryDuplicates` {boolean} If `true`, when a new input line added
to the history list duplicates an older one, this removes the older line to the history list duplicates an older one, this removes the older line
from the list. Defaults to `false`. from the list. **Default:** `false`
The `readline.createInterface()` method creates a new `readline.Interface` The `readline.createInterface()` method creates a new `readline.Interface`
instance. instance.