diff --git a/doc/STYLE_GUIDE.md b/doc/STYLE_GUIDE.md
index cb663aa9cc3551..b4ed5f932014cd 100644
--- a/doc/STYLE_GUIDE.md
+++ b/doc/STYLE_GUIDE.md
@@ -62,9 +62,9 @@
* Use a capital letter after the "Note:" label.
* Preferably, make the note a new paragraph for better visual distinction.
* Function arguments or object properties should use the following format:
- * * \`name\` {type|type2} Optional description. \*\*Default:\*\* \`defaultValue\`
- * E.g. * `byteOffset` {integer} Index of first byte to expose. **Default:** `0`
- * The `type` should refer to a Node.js type or a [JavaScript type][]
+ * * \`name\` {type|type2} Optional description. \*\*Default:\*\* \`defaultValue\`.
+ * E.g. * `byteOffset` {integer} Index of first byte to expose. **Default:** `0`.
+ * The `type` should refer to a Node.js type or a [JavaScript type][].
* Function returns should use the following format:
* * Returns: {type|type2} Optional description.
* E.g. * Returns: {AsyncHook} A reference to `asyncHook`.
diff --git a/doc/api/assert.md b/doc/api/assert.md
index 3478adbfaf2e28..d2b541111586be 100644
--- a/doc/api/assert.md
+++ b/doc/api/assert.md
@@ -280,7 +280,7 @@ added: v0.1.21
* `actual` {any}
* `expected` {any}
* `message` {any}
-* `operator` {string} **Default:** '!='
+* `operator` {string} **Default:** `'!='`
* `stackStartFunction` {Function} **Default:** `assert.fail`
Throws an `AssertionError`. If `message` is falsy, the error message is set as
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md
index 1982205faccf10..e1789e2c2b4c93 100644
--- a/doc/api/async_hooks.md
+++ b/doc/api/async_hooks.md
@@ -642,12 +642,11 @@ asyncResource.emitAfter();
* `type` {string} The type of async event.
* `options` {Object}
* `triggerAsyncId` {number} The ID of the execution context that created this
- async event. **Default:** `executionAsyncId()`
+ async event. **Default:** `executionAsyncId()`.
* `requireManualDestroy` {boolean} Disables automatic `emitDestroy` when the
object is garbage collected. This usually does not need to be set (even if
`emitDestroy` is called manually), unless the resource's asyncId is retrieved
- and the sensitive API's `emitDestroy` is called with it.
- **Default:** `false`
+ and the sensitive API's `emitDestroy` is called with it. **Default:** `false`.
Example usage:
diff --git a/doc/api/buffer.md b/doc/api/buffer.md
index 1a94d4c15dcd3a..4155b70d1c6069 100644
--- a/doc/api/buffer.md
+++ b/doc/api/buffer.md
@@ -359,9 +359,9 @@ changes:
* `arrayBuffer` {ArrayBuffer|SharedArrayBuffer} An [`ArrayBuffer`],
[`SharedArrayBuffer`] or the `.buffer` property of a [`TypedArray`].
-* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`
+* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`.
* `length` {integer} Number of bytes to expose.
- **Default:** `arrayBuffer.length - byteOffset`
+ **Default:** `arrayBuffer.length - byteOffset`.
This creates a view of the [`ArrayBuffer`] or [`SharedArrayBuffer`] without
copying the underlying memory. For example, when passed a reference to the
@@ -481,7 +481,7 @@ changes:
> Use [`Buffer.from(string[, encoding])`][`Buffer.from(string)`] instead.
* `string` {string} String to encode.
-* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`
+* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`.
Creates a new `Buffer` containing the given JavaScript string `string`. If
provided, the `encoding` parameter identifies the character encoding of `string`.
@@ -515,9 +515,9 @@ changes:
* `size` {integer} The desired length of the new `Buffer`.
* `fill` {string|Buffer|integer} A value to pre-fill the new `Buffer` with.
- **Default:** `0`
+ **Default:** `0`.
* `encoding` {string} If `fill` is a string, this is its encoding.
- **Default:** `'utf8'`
+ **Default:** `'utf8'`.
Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
`Buffer` will be *zero-filled*.
@@ -683,7 +683,7 @@ changes:
* `string` {string|Buffer|TypedArray|DataView|ArrayBuffer|SharedArrayBuffer} A
value to calculate the length of.
* `encoding` {string} If `string` is a string, this is its encoding.
- **Default:** `'utf8'`
+ **Default:** `'utf8'`.
* Returns: {integer} The number of bytes contained within `string`.
Returns the actual byte length of a string. This is not the same as
@@ -810,9 +810,9 @@ added: v5.10.0
* `arrayBuffer` {ArrayBuffer|SharedArrayBuffer} An [`ArrayBuffer`],
[`SharedArrayBuffer`], or the `.buffer` property of a [`TypedArray`].
-* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`
+* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`.
* `length` {integer} Number of bytes to expose.
- **Default:** `arrayBuffer.length - byteOffset`
+ **Default:** `arrayBuffer.length - byteOffset`.
This creates a view of the [`ArrayBuffer`] without copying the underlying
memory. For example, when passed a reference to the `.buffer` property of a
@@ -889,7 +889,7 @@ added: v5.10.0
-->
* `string` {string} A string to encode.
-* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`
+* `encoding` {string} The encoding of `string`. **Default:** `'utf8'`.
Creates a new `Buffer` containing the given JavaScript string `string`. If
provided, the `encoding` parameter identifies the character encoding of `string`.
@@ -1037,13 +1037,13 @@ changes:
* `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to compare to.
* `targetStart` {integer} The offset within `target` at which to begin
- comparison. **Default:** `0`
+ comparison. **Default:** `0`.
* `targetEnd` {integer} The offset with `target` at which to end comparison
- (not inclusive). **Default:** `target.length`
+ (not inclusive). **Default:** `target.length`.
* `sourceStart` {integer} The offset within `buf` at which to begin comparison.
- **Default:** `0`
+ **Default:** `0`.
* `sourceEnd` {integer} The offset within `buf` at which to end comparison
- (not inclusive). **Default:** [`buf.length`]
+ (not inclusive). **Default:** [`buf.length`].
* Returns: {integer}
Compares `buf` with `target` and returns a number indicating whether `buf`
@@ -1111,11 +1111,11 @@ added: v0.1.90
* `target` {Buffer|Uint8Array} A `Buffer` or [`Uint8Array`] to copy into.
* `targetStart` {integer} The offset within `target` at which to begin
- copying to. **Default:** `0`
+ copying to. **Default:** `0`.
* `sourceStart` {integer} The offset within `buf` at which to begin copying from.
- **Default:** `0`
+ **Default:** `0`.
* `sourceEnd` {integer} The offset within `buf` at which to stop copying (not
- inclusive). **Default:** [`buf.length`]
+ inclusive). **Default:** [`buf.length`].
* Returns: {integer} The number of bytes copied.
Copies data from a region of `buf` to a region in `target` even if the `target`
@@ -1222,10 +1222,10 @@ changes:
-->
* `value` {string|Buffer|integer} The value to fill `buf` with.
-* `offset` {integer} Number of bytes to skip before starting to fill `buf`. **Default:** `0`
-* `end` {integer} Where to stop filling `buf` (not inclusive). **Default:** [`buf.length`]
+* `offset` {integer} Number of bytes to skip before starting to fill `buf`. **Default:** `0`.
+* `end` {integer} Where to stop filling `buf` (not inclusive). **Default:** [`buf.length`].
* `encoding` {string} If `value` is a string, this is its encoding.
- **Default:** `'utf8'`
+ **Default:** `'utf8'`.
* Returns: {Buffer} A reference to `buf`.
Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
@@ -1276,9 +1276,9 @@ added: v5.3.0
-->
* `value` {string|Buffer|integer} What to search for.
-* `byteOffset` {integer} Where to begin searching in `buf`. **Default:** `0`
+* `byteOffset` {integer} Where to begin searching in `buf`. **Default:** `0`.
* `encoding` {string} If `value` is a string, this is its encoding.
- **Default:** `'utf8'`
+ **Default:** `'utf8'`.
* Returns: {boolean} `true` if `value` was found in `buf`, `false` otherwise.
Equivalent to [`buf.indexOf() !== -1`][`buf.indexOf()`].
@@ -1918,9 +1918,9 @@ changes:
calculations with them.
-->
-* `start` {integer} Where the new `Buffer` will start. **Default:** `0`
+* `start` {integer} Where the new `Buffer` will start. **Default:** `0`.
* `end` {integer} Where the new `Buffer` will end (not inclusive).
- **Default:** [`buf.length`]
+ **Default:** [`buf.length`].
* Returns: {Buffer}
Returns a new `Buffer` that references the same memory as the original, but
@@ -2099,10 +2099,10 @@ console.log(copy);
added: v0.1.90
-->
-* `encoding` {string} The character encoding to decode to. **Default:** `'utf8'`
-* `start` {integer} The byte offset to start decoding at. **Default:** `0`
+* `encoding` {string} The character encoding to decode to. **Default:** `'utf8'`.
+* `start` {integer} The byte offset to start decoding at. **Default:** `0`.
* `end` {integer} The byte offset to stop decoding at (not inclusive).
- **Default:** [`buf.length`]
+ **Default:** [`buf.length`].
* Returns: {string}
Decodes `buf` to a string according to the specified character encoding in
@@ -2183,9 +2183,9 @@ added: v0.1.90
-->
* `string` {string} String to be written to `buf`.
-* `offset` {integer} Number of bytes to skip before starting to write `string`. **Default:** `0`
-* `length` {integer} Number of bytes to write. **Default:** `buf.length - offset`
-* `encoding` {string} The character encoding of `string`. **Default:** `'utf8'`
+* `offset` {integer} Number of bytes to skip before starting to write `string`. **Default:** `0`.
+* `length` {integer} Number of bytes to write. **Default:** `buf.length - offset`.
+* `encoding` {string} The character encoding of `string`. **Default:** `'utf8'`.
* Returns: {integer} Number of bytes written.
Writes `string` to `buf` at `offset` according to the character encoding in `encoding`.
@@ -2520,7 +2520,7 @@ added: v0.5.5
* `offset` {integer} Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - byteLength`.
* `byteLength` {integer} Number of bytes to write. Must satisfy: `0 < byteLength <= 6`.
* `noAssert` {boolean} Skip `value`, `offset`, and `byteLength` validation?
- **Default:** `false`
+ **Default:** `false`.
* Returns: {integer} `offset` plus the number of bytes written.
Writes `byteLength` bytes of `value` to `buf` at the specified `offset`.
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index f87d94efcd80cf..98b1ae55781434 100755
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -136,15 +136,16 @@ changes:
* `command` {string} The command to run, with space-separated arguments.
* `options` {Object}
* `cwd` {string} Current working directory of the child process.
- * `env` {Object} Environment key-value pairs.
+ **Default:** `null`.
+ * `env` {Object} Environment key-value pairs. **Default:** `null`.
* `encoding` {string} **Default:** `'utf8'`
- * `shell` {string} Shell to execute the command with.
- **Default:** `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. See
- [Shell Requirements][] and [Default Windows Shell][].
+ * `shell` {string} Shell to execute the command with. See
+ [Shell Requirements][] and [Default Windows Shell][]. **Default:**
+ `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows.
* `timeout` {number} **Default:** `0`
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. **Default:** `200 * 1024`. If exceeded, the child process is
- terminated. See caveat at [`maxBuffer` and Unicode][].
+ stderr. If exceeded, the child process is terminated. See caveat at
+ [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
* `killSignal` {string|integer} **Default:** `'SIGTERM'`
* `uid` {number} Sets the user identity of the process (see setuid(2)).
* `gid` {number} Sets the group identity of the process (see setgid(2)).
@@ -200,20 +201,6 @@ can be used to specify the character encoding used to decode the stdout and
stderr output. If `encoding` is `'buffer'`, or an unrecognized character
encoding, `Buffer` objects will be passed to the callback instead.
-The `options` argument may be passed as the second argument to customize how
-the process is spawned. The default options are:
-
-```js
-const defaults = {
- encoding: 'utf8',
- timeout: 0,
- maxBuffer: 200 * 1024,
- killSignal: 'SIGTERM',
- cwd: null,
- env: null
-};
-```
-
If `timeout` is greater than `0`, the parent will send the signal
identified by the `killSignal` property (the default is `'SIGTERM'`) if the
child runs longer than `timeout` milliseconds.
@@ -257,8 +244,8 @@ changes:
* `encoding` {string} **Default:** `'utf8'`
* `timeout` {number} **Default:** `0`
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. **Default:** `200 * 1024` If exceeded, the child process is
- terminated. See caveat at [`maxBuffer` and Unicode][].
+ stderr. If exceeded, the child process is terminated. See caveat at
+ [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
* `killSignal` {string|integer} **Default:** `'SIGTERM'`
* `uid` {number} Sets the user identity of the process (see setuid(2)).
* `gid` {number} Sets the group identity of the process (see setgid(2)).
@@ -339,11 +326,11 @@ changes:
* `env` {Object} Environment key-value pairs.
* `execPath` {string} Executable used to create the child process.
* `execArgv` {Array} List of string arguments passed to the executable.
- **Default:** `process.execArgv`
+ **Default:** `process.execArgv`.
* `silent` {boolean} If `true`, stdin, stdout, and stderr of the child will be
piped to the parent, otherwise they will be inherited from the parent, see
the `'pipe'` and `'inherit'` options for [`child_process.spawn()`][]'s
- [`stdio`][] for more details. **Default:** `false`
+ [`stdio`][] for more details. **Default:** `false`.
* `stdio` {Array|string} See [`child_process.spawn()`][]'s [`stdio`][].
When this option is provided, it overrides `silent`. If the array variant
is used, it must contain exactly one item with value `'ipc'` or an error
@@ -697,22 +684,22 @@ changes:
* `options` {Object}
* `cwd` {string} Current working directory of the child process.
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
- to the spawned process.
- - supplying this value will override `stdio[0]`
- * `stdio` {string|Array} Child's stdio configuration. **Default:** `'pipe'`
- - `stderr` by default will be output to the parent process' stderr unless
- `stdio` is specified
+ to the spawned process. Supplying this value will override `stdio[0]`.
+ * `stdio` {string|Array} Child's stdio configuration. `stderr` by default will
+ be output to the parent process' stderr unless `stdio` is specified.
+ **Default:** `'pipe'`.
* `env` {Object} Environment key-value pairs.
* `uid` {number} Sets the user identity of the process (see setuid(2)).
* `gid` {number} Sets the group identity of the process (see setgid(2)).
* `timeout` {number} In milliseconds the maximum amount of time the process
- is allowed to run. **Default:** `undefined`
+ is allowed to run. **Default:** `undefined`.
* `killSignal` {string|integer} The signal value to be used when the spawned
- process will be killed. **Default:** `'SIGTERM'`
+ process will be killed. **Default:** `'SIGTERM'`.
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. **Default:** `200 * 1024` If exceeded, the child process is
- terminated. See caveat at [`maxBuffer` and Unicode][].
- * `encoding` {string} The encoding used for all stdio inputs and outputs. **Default:** `'buffer'`
+ stderr. If exceeded, the child process is terminated. See caveat at
+ [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
+ * `encoding` {string} The encoding used for all stdio inputs and outputs.
+ **Default:** `'buffer'`.
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `false`.
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
@@ -755,26 +742,25 @@ changes:
* `options` {Object}
* `cwd` {string} Current working directory of the child process.
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
- to the spawned process.
- - supplying this value will override `stdio[0]`.
- * `stdio` {string|Array} Child's stdio configuration. **Default:** `'pipe'`
- - `stderr` by default will be output to the parent process' stderr unless
- `stdio` is specified
+ to the spawned process. Supplying this value will override `stdio[0]`.
+ * `stdio` {string|Array} Child's stdio configuration. `stderr` by default will
+ be output to the parent process' stderr unless `stdio` is specified.
+ **Default:** `'pipe'`.
* `env` {Object} Environment key-value pairs.
- * `shell` {string} Shell to execute the command with.
- **Default:** `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. See
- [Shell Requirements][] and [Default Windows Shell][].
+ * `shell` {string} Shell to execute the command with. See
+ [Shell Requirements][] and [Default Windows Shell][]. **Default:**
+ `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows.
* `uid` {number} Sets the user identity of the process. (See setuid(2)).
* `gid` {number} Sets the group identity of the process. (See setgid(2)).
* `timeout` {number} In milliseconds the maximum amount of time the process
- is allowed to run. **Default:** `undefined`
+ is allowed to run. **Default:** `undefined`.
* `killSignal` {string|integer} The signal value to be used when the spawned
- process will be killed. **Default:** `'SIGTERM'`
+ process will be killed. **Default:** `'SIGTERM'`.
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. **Default:** `200 * 1024` If exceeded, the child process is
- terminated. See caveat at [`maxBuffer` and Unicode][].
+ stderr. If exceeded, the child process is terminated. See caveat at
+ [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
* `encoding` {string} The encoding used for all stdio inputs and outputs.
- **Default:** `'buffer'`
+ **Default:** `'buffer'`.
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `false`.
* Returns: {Buffer|string} The stdout from the command.
@@ -818,21 +804,20 @@ changes:
* `options` {Object}
* `cwd` {string} Current working directory of the child process.
* `input` {string|Buffer|Uint8Array} The value which will be passed as stdin
- to the spawned process.
- - supplying this value will override `stdio[0]`.
+ to the spawned process. Supplying this value will override `stdio[0]`.
* `stdio` {string|Array} Child's stdio configuration.
* `env` {Object} Environment key-value pairs.
* `uid` {number} Sets the user identity of the process (see setuid(2)).
* `gid` {number} Sets the group identity of the process (see setgid(2)).
* `timeout` {number} In milliseconds the maximum amount of time the process
- is allowed to run. **Default:** `undefined`
+ is allowed to run. **Default:** `undefined`.
* `killSignal` {string|integer} The signal value to be used when the spawned
- process will be killed. **Default:** `'SIGTERM'`
+ process will be killed. **Default:** `'SIGTERM'`.
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
- stderr. **Default:** `200 * 1024` If exceeded, the child process is
- terminated. See caveat at [`maxBuffer` and Unicode][].
+ stderr. If exceeded, the child process is terminated. See caveat at
+ [`maxBuffer` and Unicode][]. **Default:** `200 * 1024`.
* `encoding` {string} The encoding used for all stdio inputs and outputs.
- **Default:** `'buffer'`
+ **Default:** `'buffer'`.
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
`'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different
shell can be specified as a string. See [Shell Requirements][] and
@@ -1109,7 +1094,12 @@ changes:
* `message` {Object}
* `sendHandle` {Handle}
-* `options` {Object}
+* `options` {Object} The `options` argument, if present, is an object used to
+ parameterize the sending of certain types of handles. `options` supports
+ the following properties:
+ * `keepOpen` - A Boolean value that can be used when passing instances of
+ `net.Socket`. When `true`, the socket is kept open in the sending process.
+ **Default:** `false`.
* `callback` {Function}
* Returns: {boolean}
@@ -1164,14 +1154,6 @@ receive the object as the second argument passed to the callback function
registered on the [`process.on('message')`][] event. Any data that is received
and buffered in the socket will not be sent to the child.
-The `options` argument, if present, is an object used to parameterize the
-sending of certain types of handles. `options` supports the following
-properties:
-
- * `keepOpen` - A Boolean value that can be used when passing instances of
- `net.Socket`. When `true`, the socket is kept open in the sending process.
- Defaults to `false`.
-
The optional `callback` is a function that is invoked after the message is
sent but before the child may have received it. The function is called with a
single argument: `null` on success, or an [`Error`][] object on failure.
diff --git a/doc/api/cluster.md b/doc/api/cluster.md
index f66a21cd5e3d37..3e3428203a4968 100644
--- a/doc/api/cluster.md
+++ b/doc/api/cluster.md
@@ -747,14 +747,14 @@ 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)`
+ **Default:** `process.argv.slice(2)`.
* `cwd` {string} Current working directory of the worker process. **Default:**
- `undefined` (inherits from parent process)
+ `undefined` (inherits from parent process).
* `silent` {boolean} Whether or not to send output to parent's stdio.
- **Default:** `false`
+ **Default:** `false`.
* `stdio` {Array} Configures the stdio of forked processes. Because the
cluster module relies on IPC to function, this configuration must contain an
`'ipc'` entry. When this option is provided, it overrides `silent`.
@@ -765,7 +765,7 @@ changes:
number. By default each worker gets its own port, incremented from the
master's `process.debugPort`.
* `windowsHide` {boolean} Hide the forked processes console window that would
- normally be created on Windows systems. **Default:** `false`
+ normally be created on Windows systems. **Default:** `false`.
After calling `.setupMaster()` (or `.fork()`) this settings object will contain
the settings, including the default values.
diff --git a/doc/api/console.md b/doc/api/console.md
index 6ccced77d1252e..bb6fb789730e43 100644
--- a/doc/api/console.md
+++ b/doc/api/console.md
@@ -187,7 +187,7 @@ binary.
added: v8.3.0
-->
-* `label` {string} The display label for the counter. Defaults to `'default'`.
+* `label` {string} The display label for the counter. **Default:** `'default'`.
Maintains an internal counter specific to `label` and outputs to `stdout` the
number of times `console.count()` has been called with the given `label`.
@@ -220,7 +220,7 @@ undefined
added: v8.3.0
-->
-* `label` {string} The display label for the counter. Defaults to `'default'`.
+* `label` {string} The display label for the counter. **Default:** `'default'`.
Resets the internal counter specific to `label`.
@@ -252,25 +252,17 @@ added: v0.1.101
-->
* `obj` {any}
* `options` {Object}
- * `showHidden` {boolean}
- * `depth` {number}
- * `colors` {boolean}
+ * `showHidden` {boolean} If `true` then the object's non-enumerable and symbol
+ properties will be shown too. **Default:** `false`.
+ * `depth` {number} Tells [`util.inspect()`][] how many times to recurse while
+ formatting the object. This is useful for inspecting large complicated
+ objects. To make it recurse indefinitely, pass `null`. **Default:** `2`.
+ * `colors` {boolean} If `true`, then the output will be styled with ANSI color
+ codes. Colors are customizable;
+ see [customizing `util.inspect()` colors][]. **Default:** `false`.
Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`.
-This function bypasses any custom `inspect()` function defined on `obj`. An
-optional `options` object may be passed to alter certain aspects of the
-formatted string:
-
-- `showHidden` - if `true` then the object's non-enumerable and symbol
-properties will be shown too. Defaults to `false`.
-
-- `depth` - tells [`util.inspect()`][] how many times to recurse while
-formatting the object. This is useful for inspecting large complicated objects.
-Defaults to `2`. To make it recurse indefinitely, pass `null`.
-
-- `colors` - if `true`, then the output will be styled with ANSI color codes.
-Defaults to `false`. Colors are customizable; see
-[customizing `util.inspect()` colors][].
+This function bypasses any custom `inspect()` function defined on `obj`.
### console.error([data][, ...args])
-- `autoPadding` {boolean} Defaults to `true`.
+- `autoPadding` {boolean} **Default:** `true`
- Returns the {Cipher} for method chaining.
When using block encryption algorithms, the `Cipher` class will automatically
@@ -389,7 +389,7 @@ The `decipher.setAuthTag()` method must be called before
-- `autoPadding` {boolean} Defaults to `true`.
+- `autoPadding` {boolean} **Default:** `true`
- Returns the {Cipher} for method chaining.
When data has been encrypted without standard block padding, calling
@@ -630,7 +630,7 @@ If `outputEncoding` is given a string will be returned; otherwise a
added: v0.11.14
-->
- `encoding` {string}
-- `format` {string} Defaults to `uncompressed`.
+- `format` {string} **Default:** `uncompressed`
Generates private and public EC Diffie-Hellman key values, and returns
the public key in the specified `format` and `encoding`. This key should be
@@ -659,7 +659,7 @@ a string is returned; otherwise a [`Buffer`][] is returned.
added: v0.11.14
-->
- `encoding` {string}
-- `format` {string} Defaults to `uncompressed`.
+- `format` {string} **Default:** `uncompressed`
Returns the EC Diffie-Hellman public key in the specified `encoding` and
`format`.
@@ -1327,7 +1327,8 @@ changes:
-->
- `prime` {string | Buffer | TypedArray | DataView}
- `primeEncoding` {string}
-- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
+- `generator` {number | string | Buffer | TypedArray | DataView} **Default:**
+ `2`
- `generatorEncoding` {string}
Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
@@ -1350,7 +1351,8 @@ otherwise a number, [`Buffer`][], `TypedArray`, or `DataView` is expected.
added: v0.5.0
-->
- `primeLength` {number}
-- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
+- `generator` {number | string | Buffer | TypedArray | DataView} **Default:**
+ `2`
Creates a `DiffieHellman` key exchange object and generates a prime of
`primeLength` bits using an optional specific numeric `generator`.
@@ -1785,8 +1787,8 @@ added: v7.10.0
-->
* `buffer` {Buffer|Uint8Array} Must be supplied.
-* `offset` {number} Defaults to `0`.
-* `size` {number} Defaults to `buffer.length - offset`.
+* `offset` {number} **Default:** `0`
+* `size` {number} **Default:** `buffer.length - offset`
Synchronous version of [`crypto.randomFill()`][].
@@ -1810,8 +1812,8 @@ added: v7.10.0
-->
* `buffer` {Buffer|Uint8Array} Must be supplied.
-* `offset` {number} Defaults to `0`.
-* `size` {number} Defaults to `buffer.length - offset`.
+* `offset` {number} **Default:** `0`
+* `size` {number} **Default:** `buffer.length - offset`
* `callback` {Function} `function(err, buf) {}`.
This function is similar to [`crypto.randomBytes()`][] but requires the first
@@ -1853,7 +1855,7 @@ client request.
added: v0.11.11
-->
- `engine` {string}
-- `flags` {crypto.constants} Defaults to `crypto.constants.ENGINE_METHOD_ALL`.
+- `flags` {crypto.constants} **Default:** `crypto.constants.ENGINE_METHOD_ALL`
Load and set the `engine` for some or all OpenSSL functions (selected by flags).
diff --git a/doc/api/dgram.md b/doc/api/dgram.md
index 02719f922bdc16..652e2baadcdf31 100644
--- a/doc/api/dgram.md
+++ b/doc/api/dgram.md
@@ -583,10 +583,10 @@ changes:
Required.
* `reuseAddr` {boolean} When `true` [`socket.bind()`][] will reuse the
address, even if another process has already bound a socket on it.
- Defaults to `false`.
+ **Default:** `false`.
* `recvBufferSize` {number} - Sets the `SO_RCVBUF` socket value.
* `sendBufferSize` {number} - Sets the `SO_SNDBUF` socket value.
- * `lookup` {Function} Custom lookup function. Defaults to [`dns.lookup()`][].
+ * `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
* `callback` {Function} Attached as a listener for `'message'` events. Optional.
* Returns: {dgram.Socket}
diff --git a/doc/api/dns.md b/doc/api/dns.md
index afd988d3bd5126..88467c4a0bd821 100644
--- a/doc/api/dns.md
+++ b/doc/api/dns.md
@@ -141,7 +141,7 @@ 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. **Default:** `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.
@@ -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}
diff --git a/doc/api/fs.md b/doc/api/fs.md
index a50640477dcfa1..2f15aeeb73c169 100644
--- a/doc/api/fs.md
+++ b/doc/api/fs.md
@@ -887,7 +887,7 @@ added: v8.5.0
* `src` {string|Buffer|URL} source filename to copy
* `dest` {string|Buffer|URL} destination filename of the copy operation
-* `flags` {number} modifiers for copy operation. **Default:** `0`
+* `flags` {number} modifiers for copy operation. **Default:** `0`.
* `callback` {Function}
Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
@@ -930,7 +930,7 @@ added: v8.5.0
* `src` {string|Buffer|URL} source filename to copy
* `dest` {string|Buffer|URL} destination filename of the copy operation
-* `flags` {number} modifiers for copy operation. **Default:** `0`
+* `flags` {number} modifiers for copy operation. **Default:** `0`.
Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it
already exists. Returns `undefined`. Node.js makes no guarantees about the
@@ -1635,7 +1635,7 @@ changes:
* `err` {Error}
Asynchronously creates a directory. No arguments other than a possible exception
-are given to the completion callback. `mode` defaults to `0o777`.
+are given to the completion callback.
See also: mkdir(2)
@@ -1756,7 +1756,7 @@ changes:
* `path` {string|Buffer|URL}
* `flags` {string|number}
-* `mode` {integer} **Default:** `0o666`
+* `mode` {integer} **Default:** `0o666` (readable and writable)
* `callback` {Function}
* `err` {Error}
* `fd` {integer}
@@ -1806,7 +1806,7 @@ The file is created if it does not exist.
The file is created if it does not exist.
`mode` sets the file mode (permission and sticky bits), but only if the file was
-created. It defaults to `0o666` (readable and writable).
+created.
The callback gets two arguments `(err, fd)`.
@@ -2377,7 +2377,7 @@ changes:
Asynchronous symlink(2). No arguments other than a possible exception are given
to the completion callback. The `type` argument can be set to `'dir'`,
-`'file'`, or `'junction'` (default is `'file'`) and is only available on
+`'file'`, or `'junction'` and is only available on
Windows (ignored on other platforms). Note that Windows junction points require
the destination path to be absolute. When using `'junction'`, the `target`
argument will automatically be normalized to absolute path.
@@ -2581,13 +2581,13 @@ changes:
* `filename` {string|Buffer|URL}
* `options` {string|Object}
* `persistent` {boolean} Indicates whether the process should continue to run
- as long as files are being watched. **Default:** `true`
+ as long as files are being watched. **Default:** `true`.
* `recursive` {boolean} Indicates whether all subdirectories should be
watched, or only the current directory. This applies when a directory is
specified, and only on supported platforms (See [Caveats][]). **Default:**
- `false`
+ `false`.
* `encoding` {string} Specifies the character encoding to be used for the
- filename passed to the listener. **Default:** `'utf8'`
+ filename passed to the listener. **Default:** `'utf8'`.
* `listener` {Function|undefined} **Default:** `undefined`
* `eventType` {string}
* `filename` {string|Buffer}
@@ -2700,8 +2700,7 @@ The `options` argument may be omitted. If provided, it should be an object. The
`options` object may contain a boolean named `persistent` that indicates
whether the process should continue to run as long as files are being watched.
The `options` object may specify an `interval` property indicating how often the
-target should be polled in milliseconds. The default is
-`{ persistent: true, interval: 5007 }`.
+target should be polled in milliseconds.
The `listener` gets two arguments the current stat object and the previous
stat object:
@@ -2862,8 +2861,7 @@ changes:
Asynchronously writes data to a file, replacing the file if it already exists.
`data` can be a string or a buffer.
-The `encoding` option is ignored if `data` is a buffer. It defaults
-to `'utf8'`.
+The `encoding` option is ignored if `data` is a buffer.
Example:
diff --git a/doc/api/http.md b/doc/api/http.md
index 79ed99a388065d..ff5c06f26a80f6 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -116,16 +116,16 @@ added: v0.3.4
Can have the following fields:
* `keepAlive` {boolean} Keep sockets around even when there are no
outstanding requests, so they can be used for future requests without
- having to reestablish a TCP connection. Defaults to `false`
+ having to reestablish a TCP connection. **Default:** `false`.
* `keepAliveMsecs` {number} When using the `keepAlive` option, specifies
the [initial delay](net.html#net_socket_setkeepalive_enable_initialdelay)
for TCP Keep-Alive packets. Ignored when the
- `keepAlive` option is `false` or `undefined`. Defaults to `1000`.
+ `keepAlive` option is `false` or `undefined`. **Default:** `1000`.
* `maxSockets` {number} Maximum number of sockets to allow per
- host. Defaults to `Infinity`.
+ host. **Default:** `Infinity`.
* `maxFreeSockets` {number} Maximum number of sockets to leave open
in a free state. Only relevant if `keepAlive` is set to `true`.
- Defaults to `256`.
+ **Default:** `256`.
The default [`http.globalAgent`][] that is used by [`http.request()`][] has all
of these values set to their respective defaults.
@@ -878,17 +878,16 @@ connections.
added: v0.7.0
-->
-* {number} Defaults to 2000.
+* {number} **Default:** `2000`
-Limits maximum incoming headers count, equal to 2000 by default. If set to 0 -
-no limit will be applied.
+Limits maximum incoming headers count. If set to 0 - no limit will be applied.
### server.setTimeout([msecs][, callback])
-* `msecs` {number} Defaults to 120000 (2 minutes).
+* `msecs` {number} **Default:** `120000` (2 minutes)
* `callback` {Function}
Sets the timeout value for sockets, and emits a `'timeout'` event on
@@ -909,7 +908,7 @@ Returns `server`.
added: v0.9.12
-->
-* {number} Timeout in milliseconds. Defaults to 120000 (2 minutes).
+* {number} Timeout in milliseconds. **Default:** `120000` (2 minutes).
The number of milliseconds of inactivity before a socket is presumed
to have timed out.
@@ -924,7 +923,7 @@ value only affects new connections to the server, not any existing connections.
added: v8.0.0
-->
-* {number} Timeout in milliseconds. Defaults to 5000 (5 seconds).
+* {number} Timeout in milliseconds. **Default:** `5000` (5 seconds).
The number of milliseconds of inactivity a server needs to wait for additional
incoming data, after it has finished writing the last response, before a socket
@@ -1287,7 +1286,7 @@ added: v0.1.29
-->
* `chunk` {string|Buffer}
-* `encoding` {string}
+* `encoding` {string} **Default:** `'utf8'`
* `callback` {Function}
* Returns: {boolean}
@@ -1303,8 +1302,7 @@ _must not_ include a message body.
`chunk` can be a string or a buffer. If `chunk` is a string,
the second parameter specifies how to encode it into a byte stream.
-By default the `encoding` is `'utf8'`. `callback` will be called when this chunk
-of data is flushed.
+`callback` will be called when this chunk of data is flushed.
*Note*: This is the raw HTTP body and has nothing to do with
higher-level multi-part body encodings that may be used.
@@ -1674,11 +1672,11 @@ changes:
-->
- `options` {Object}
* `IncomingMessage` {http.IncomingMessage} Specifies the IncomingMessage class
- to be used. Useful for extending the original `IncomingMessage`. Defaults
- to: `IncomingMessage`
+ to be used. Useful for extending the original `IncomingMessage`.
+ **Default:** `IncomingMessage`.
* `ServerResponse` {http.ServerResponse} Specifies the ServerResponse class to
- be used. Useful for extending the original `ServerResponse`. Defaults to:
- `ServerResponse`
+ be used. Useful for extending the original `ServerResponse`. **Default:**
+ `ServerResponse`.
- `requestListener` {Function}
* Returns: {http.Server}
@@ -1770,24 +1768,24 @@ changes:
-->
* `options` {Object | string | URL}
- * `protocol` {string} Protocol to use. Defaults to `http:`.
+ * `protocol` {string} Protocol to use. **Default:** `http:`.
* `host` {string} A domain name or IP address of the server to issue the
- request to. Defaults to `localhost`.
+ request to. **Default:** `localhost`.
* `hostname` {string} Alias for `host`. To support [`url.parse()`][],
`hostname` is preferred over `host`.
* `family` {number} IP address family to use when resolving `host` and
`hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and
v6 will be used.
- * `port` {number} Port of remote server. Defaults to 80.
+ * `port` {number} Port of remote server. **Default:** `80`.
* `localAddress` {string} Local interface to bind for network connections.
* `socketPath` {string} Unix Domain Socket (use one of host:port or
socketPath).
- * `method` {string} A string specifying the HTTP request method. Defaults to
+ * `method` {string} A string specifying the HTTP request method. **Default:**
`'GET'`.
- * `path` {string} Request path. Defaults to `'/'`. Should include query
- string if any. E.G. `'/index.html?page=12'`. An exception is thrown when
- the request path contains illegal characters. Currently, only spaces are
- rejected but that may change in the future.
+ * `path` {string} Request path. Should include query string if any.
+ E.G. `'/index.html?page=12'`. An exception is thrown when the request path
+ contains illegal characters. Currently, only spaces are rejected but that
+ may change in the future. **Default:** `'/'`.
* `headers` {Object} An object containing request headers.
* `auth` {string} Basic authentication i.e. `'user:password'` to compute an
Authorization header.
diff --git a/doc/api/http2.md b/doc/api/http2.md
index 0331d45bb54d74..fbabb47c74352c 100644
--- a/doc/api/http2.md
+++ b/doc/api/http2.md
@@ -692,7 +692,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.
- **Default:** `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
@@ -896,7 +896,7 @@ added: v8.4.0
-->
* code {number} Unsigned 32-bit integer identifying the error code. **Default:**
- `http2.constants.NGHTTP2_NO_ERROR` (`0x00`)
+ `http2.constants.NGHTTP2_NO_ERROR` (`0x00`).
* `callback` {Function} An optional function registered to listen for the
`'close'` event.
* Returns: {undefined}
@@ -942,7 +942,7 @@ added: v8.4.0
* `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. **Default:**
- `false`
+ `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
@@ -1170,7 +1170,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.
- **Default:** `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
@@ -1706,20 +1706,20 @@ changes:
* `options` {Object}
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
- for deflating header fields. **Default:** `4Kib`
+ for deflating header fields. **Default:** `4Kib`.
* `maxSessionMemory`{number} Sets the maximum memory that the `Http2Session`
is permitted to use. The value is expressed in terms of number of megabytes,
- e.g. `1` equal 1 megabyte. The minimum value allowed is `1`. **Default:**
- `10`. This is a credit based limit, existing `Http2Stream`s may cause this
+ e.g. `1` equal 1 megabyte. The minimum value allowed is `1`.
+ This is a credit based limit, existing `Http2Stream`s may cause this
limit to be exceeded, but new `Http2Stream` instances will be rejected
while this limit is exceeded. The current number of `Http2Stream` sessions,
the current memory use of the header compression tables, current data
queued to be sent, and unacknowledged PING and SETTINGS frames are all
- counted towards the current limit.
+ counted towards the current limit. **Default:** `10`.
* `maxHeaderListPairs` {number} Sets the maximum number of header entries.
- **Default:** `128`. The minimum value is `4`.
+ The minimum value is `4`. **Default:** `128`.
* `maxOutstandingPings` {number} Sets the maximum number of outstanding,
- unacknowledged pings. The default is `10`.
+ unacknowledged pings. **Default:** `10`.
* `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
@@ -1745,7 +1745,7 @@ changes:
* `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`. **Default:** `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][].
@@ -1753,18 +1753,18 @@ changes:
remote peer upon connection.
* `Http1IncomingMessage` {http.IncomingMessage} Specifies the IncomingMessage
class to used for HTTP/1 fallback. Useful for extending the original
- `http.IncomingMessage`. **Default:** `http.IncomingMessage`
+ `http.IncomingMessage`. **Default:** `http.IncomingMessage`.
* `Http1ServerResponse` {http.ServerResponse} Specifies the ServerResponse
class to used for HTTP/1 fallback. Useful for extending the original
- `http.ServerResponse`. **Default:** `http.ServerResponse`
+ `http.ServerResponse`. **Default:** `http.ServerResponse`.
* `Http2ServerRequest` {http2.Http2ServerRequest} Specifies the
Http2ServerRequest class to use.
Useful for extending the original `Http2ServerRequest`.
- **Default:** `Http2ServerRequest`
+ **Default:** `Http2ServerRequest`.
* `Http2ServerResponse` {http2.Http2ServerResponse} Specifies the
Http2ServerResponse class to use.
Useful for extending the original `Http2ServerResponse`.
- **Default:** `Http2ServerResponse`
+ **Default:** `Http2ServerResponse`.
* `onRequestHandler` {Function} See [Compatibility API][]
* Returns: {Http2Server}
@@ -1812,23 +1812,24 @@ changes:
* `options` {Object}
* `allowHTTP1` {boolean} Incoming client connections that do not support
- HTTP/2 will be downgraded to HTTP/1.x when set to `true`. **Default:**
- `false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
+ HTTP/2 will be downgraded to HTTP/1.x when set to `true`.
+ See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
+ **Default:** `false`.
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
- for deflating header fields. **Default:** `4Kib`
+ for deflating header fields. **Default:** `4Kib`.
* `maxSessionMemory`{number} Sets the maximum memory that the `Http2Session`
is permitted to use. The value is expressed in terms of number of megabytes,
- e.g. `1` equal 1 megabyte. The minimum value allowed is `1`. **Default:**
- `10`. This is a credit based limit, existing `Http2Stream`s may cause this
+ e.g. `1` equal 1 megabyte. The minimum value allowed is `1`. This is a
+ credit based limit, existing `Http2Stream`s may cause this
limit to be exceeded, but new `Http2Stream` instances will be rejected
while this limit is exceeded. The current number of `Http2Stream` sessions,
the current memory use of the header compression tables, current data
queued to be sent, and unacknowledged PING and SETTINGS frames are all
- counted towards the current limit.
+ counted towards the current limit. **Default:** `10`.
* `maxHeaderListPairs` {number} Sets the maximum number of header entries.
- **Default:** `128`. The minimum value is `4`.
+ The minimum value is `4`. **Default:** `128`.
* `maxOutstandingPings` {number} Sets the maximum number of outstanding,
- unacknowledged pings. The default is `10`.
+ unacknowledged pings. **Default:** `10`.
* `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
@@ -1854,7 +1855,7 @@ changes:
* `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`. **Default:** `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][].
@@ -1907,20 +1908,20 @@ changes:
* `authority` {string|URL}
* `options` {Object}
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
- for deflating header fields. **Default:** `4Kib`
+ for deflating header fields. **Default:** `4Kib`.
* `maxSessionMemory`{number} Sets the maximum memory that the `Http2Session`
is permitted to use. The value is expressed in terms of number of megabytes,
- e.g. `1` equal 1 megabyte. The minimum value allowed is `1`. **Default:**
- `10`. This is a credit based limit, existing `Http2Stream`s may cause this
+ e.g. `1` equal 1 megabyte. The minimum value allowed is `1`.
+ This is a credit based limit, existing `Http2Stream`s may cause this
limit to be exceeded, but new `Http2Stream` instances will be rejected
while this limit is exceeded. The current number of `Http2Stream` sessions,
the current memory use of the header compression tables, current data
queued to be sent, and unacknowledged PING and SETTINGS frames are all
- counted towards the current limit.
+ counted towards the current limit. **Default:** `10`.
* `maxHeaderListPairs` {number} Sets the maximum number of header entries.
- **Default:** `128`. The minimum value is `1`.
+ The minimum value is `1`. **Default:** `128`.
* `maxOutstandingPings` {number} Sets the maximum number of outstanding,
- unacknowledged pings. The default is `10`.
+ unacknowledged pings. **Default:** `10`.
* `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
@@ -1950,7 +1951,7 @@ changes:
* `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`. **Default:** `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][].
@@ -2095,16 +2096,16 @@ These objects are ordinary JavaScript objects containing the following
properties.
* `headerTableSize` {number} Specifies the maximum number of bytes used for
- header compression. **Default:** `4,096 octets`. The minimum allowed
- value is 0. The maximum allowed value is 232-1.
+ header compression. The minimum allowed value is 0. The maximum allowed value
+ is 232-1. **Default:** `4,096 octets`.
* `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. **Default:** `65,535 bytes`. The minimum
- allowed value is 0. The maximum allowed value is 232-1.
+ for stream-level flow control. The minimum allowed value is 0. The maximum
+ allowed value is 232-1. **Default:** `65,535 bytes`.
* `maxFrameSize` {number} Specifies the size of the largest frame payload.
- **Default:** `16,384 bytes`. The minimum allowed value is 16,384. The maximum
- allowed value is 224-1.
+ The minimum allowed value is 16,384. The maximum allowed value
+ is 224-1. **Default:** `16,384 bytes`.
* `maxConcurrentStreams` {number} Specifies the maximum number of concurrent
streams permitted on an `Http2Session`. There is no default value which
implies, at least theoretically, 231-1 streams may be open
@@ -2112,7 +2113,7 @@ properties.
is 0. The maximum allowed value is 231-1.
* `maxHeaderListSize` {number} Specifies the maximum size (uncompressed octets)
of header list that will be accepted. The minimum allowed value is 0. The
- maximum allowed value is 232-1. **Default:** 65535.
+ maximum allowed value is 232-1. **Default:** `65535`.
All additional properties on the settings object are ignored.
diff --git a/doc/api/https.md b/doc/api/https.md
index 490c3f477f9d41..ee023810f80b76 100644
--- a/doc/api/https.md
+++ b/doc/api/https.md
@@ -40,7 +40,7 @@ This method is identical to [`server.listen()`][] from [`net.Server`][].
-- `msecs` {number} Defaults to 120000 (2 minutes).
+- `msecs` {number} **Default:** `120000` (2 minutes)
- `callback` {Function}
See [`http.Server#setTimeout()`][].
@@ -49,7 +49,7 @@ See [`http.Server#setTimeout()`][].
-- {number} Defaults to 120000 (2 minutes).
+- {number} **Default:** `120000` (2 minutes)
See [`http.Server#timeout`][].
@@ -57,7 +57,7 @@ See [`http.Server#timeout`][].
-- {number} Defaults to 5000 (5 seconds).
+- {number} **Default:** `5000` (5 seconds)
See [`http.Server#keepAliveTimeout`][].
@@ -155,11 +155,11 @@ changes:
pr-url: https://github.com/nodejs/node/pull/10638
description: The `options` parameter can be a WHATWG `URL` object.
-->
-- `options` {Object | string | URL} Accepts all `options` from [`http.request()`][],
- with some differences in default values:
- - `protocol` Defaults to `https:`
- - `port` Defaults to `443`.
- - `agent` Defaults to `https.globalAgent`.
+- `options` {Object | string | URL} Accepts all `options` from
+ [`http.request()`][], with some differences in default values:
+ - `protocol` **Default:** `https:`
+ - `port` **Default:** `443`
+ - `agent` **Default:** `https.globalAgent`
- `callback` {Function}
diff --git a/doc/api/inspector.md b/doc/api/inspector.md
index c801510b7563f2..bd277ff0a8f090 100644
--- a/doc/api/inspector.md
+++ b/doc/api/inspector.md
@@ -14,12 +14,12 @@ const inspector = require('inspector');
## inspector.open([port[, host[, wait]]])
-* port {number} Port to listen on for inspector connections. Optional,
- defaults to what was specified on the CLI.
-* host {string} Host to listen on for inspector connections. Optional,
- defaults to what was specified on the CLI.
-* wait {boolean} Block until a client has connected. Optional, defaults
- to false.
+* `port` {number} Port to listen on for inspector connections. Optional.
+ **Default:** what was specified on the CLI.
+* `host` {string} Host to listen on for inspector connections. Optional.
+ **Default:** what was specified on the CLI.
+* `wait` {boolean} Block until a client has connected. Optional.
+ **Default:** `false`.
Activate inspector on host and port. Equivalent to `node
--inspect=[[host:]port]`, but can be done programmatically after node has
diff --git a/doc/api/net.md b/doc/api/net.md
index f281d480304862..9f75b1b6721442 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -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. **Default:** `false`
+ for details. **Default:** `false`.
* `readable` {boolean} Allow reads on the socket when an `fd` is passed,
- otherwise ignored. **Default:** `false`
+ otherwise ignored. **Default:** `false`.
* `writable` {boolean} Allow writes on the socket when an `fd` is passed,
- otherwise ignored. **Default:** `false`
+ otherwise ignored. **Default:** `false`.
* Returns: {net.Socket}
The newly created socket can be either a TCP socket or a streaming [IPC][]
@@ -581,12 +581,13 @@ 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. **Default:** `'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. **Default:** `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. **Default:** [`dns.lookup()`][]
+* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
For [IPC][] connections, available `options` are:
@@ -755,28 +756,29 @@ Set the encoding for the socket as a [Readable Stream][]. See
added: v0.1.92
-->
+* `enable` {boolean} **Default:** `false`
+* `initialDelay` {number} **Default:** `0`
* Returns: {net.Socket} The socket itself.
Enable/disable keep-alive functionality, and optionally set the initial
delay before the first keepalive probe is sent on an idle socket.
-`enable` defaults to `false`.
Set `initialDelay` (in milliseconds) to set the delay between the last
data packet received and the first keepalive probe. Setting 0 for
initialDelay will leave the value unchanged from the default
-(or previous) setting. Defaults to `0`.
+(or previous) setting.
### socket.setNoDelay([noDelay])
+* `noDelay` {boolean} **Default:** `true`
* Returns: {net.Socket} The socket itself.
Disables the Nagle algorithm. By default TCP connections use the Nagle
algorithm, they buffer data before sending it off. Setting `true` for
`noDelay` will immediately fire off data each time `socket.write()` is called.
-`noDelay` defaults to `true`.
### socket.setTimeout(timeout[, callback])
-* `code` {integer} The exit code. Defaults to `0`.
+* `code` {integer} The exit code. **Default:** `0`.
The `process.exit()` method instructs Node.js to terminate the process
synchronously with an exit status of `code`. If `code` is omitted, exit uses
@@ -1170,7 +1170,7 @@ added: v0.0.6
* `pid` {number} A process ID
* `signal` {string|number} The signal to send, either as a string or number.
- Defaults to `'SIGTERM'`.
+ **Default:** `'SIGTERM'`.
The `process.kill()` method sends the `signal` to the process identified by
`pid`.
diff --git a/doc/api/querystring.md b/doc/api/querystring.md
index 5bd4f1cce192a7..d70ea2419eb515 100644
--- a/doc/api/querystring.md
+++ b/doc/api/querystring.md
@@ -46,15 +46,15 @@ changes:
* `str` {string} The URL query string to parse
* `sep` {string} The substring used to delimit key and value pairs in the
- query string. Defaults to `'&'`.
+ query string. **Default:** `'&'`.
* `eq` {string}. The substring used to delimit keys and values in the
- query string. Defaults to `'='`.
+ query string. **Default:** `'='`.
* `options` {Object}
* `decodeURIComponent` {Function} The function to use when decoding
- percent-encoded characters in the query string. Defaults to
+ percent-encoded characters in the query string. **Default:**
`querystring.unescape()`.
* `maxKeys` {number} Specifies the maximum number of keys to parse.
- Defaults to `1000`. Specify `0` to remove key counting limitations.
+ Specify `0` to remove key counting limitations. **Default:** `1000`.
The `querystring.parse()` method parses a URL query string (`str`) into a
collection of key and value pairs.
@@ -93,12 +93,12 @@ added: v0.1.25
* `obj` {Object} The object to serialize into a URL query string
* `sep` {string} The substring used to delimit key and value pairs in the
- query string. Defaults to `'&'`.
+ query string. **Default:** `'&'`.
* `eq` {string}. The substring used to delimit keys and values in the
- query string. Defaults to `'='`.
+ query string. **Default:** `'='`.
* `options`
* `encodeURIComponent` {Function} The function to use when converting
- URL-unsafe characters to percent-encoding in the query string. Defaults to
+ URL-unsafe characters to percent-encoding in the query string. **Default:**
`querystring.escape()`.
The `querystring.stringify()` method produces a URL query string from a
diff --git a/doc/api/readline.md b/doc/api/readline.md
index 78571d7e993ef8..db1baca448290c 100644
--- a/doc/api/readline.md
+++ b/doc/api/readline.md
@@ -368,21 +368,22 @@ changes:
* `completer` {Function} An optional function used for Tab autocompletion.
* `terminal` {boolean} `true` if the `input` and `output` streams should be
treated like a TTY, and have ANSI/VT100 escape codes written to it.
- Defaults to checking `isTTY` on the `output` stream upon instantiation.
+ **Default:** checking `isTTY` on the `output` stream upon instantiation.
* `historySize` {number} Maximum number of history lines retained. To disable
- the history set this value to `0`. This option makes sense only if `terminal`
- is set to `true` by the user or by an internal `output` check, otherwise the
- history caching mechanism is not initialized at all. **Default:** `30`
- * `prompt` {string} The prompt string to use. **Default:** `'> '`
+ the history set this value to `0`. This option makes sense only if
+ `terminal` is set to `true` by the user or by an internal `output` check,
+ otherwise the history caching mechanism is not initialized at all.
+ **Default:** `30`.
+ * `prompt` {string} The prompt string to use. **Default:** `'> '`.
* `crlfDelay` {number} If the delay between `\r` and `\n` exceeds
`crlfDelay` milliseconds, both `\r` and `\n` will be treated as separate
- end-of-line input. `crlfDelay` will be coerced to a number no less than `100`.
- It can be set to `Infinity`, in which case `\r` followed by `\n` will always be
- considered a single newline (which may be reasonable for [reading files][]
- with `\r\n` line delimiter). **Default:** `100`
+ end-of-line input. `crlfDelay` will be coerced to a number no less than
+ `100`. It can be set to `Infinity`, in which case `\r` followed by `\n`
+ will always be considered a single newline (which may be reasonable for
+ [reading files][] with `\r\n` line delimiter). **Default:** `100`.
* `removeHistoryDuplicates` {boolean} If `true`, when a new input line added
to the history list duplicates an older one, this removes the older line
- from the list. **Default:** `false`
+ from the list. **Default:** `false`.
The `readline.createInterface()` method creates a new `readline.Interface`
instance.
diff --git a/doc/api/repl.md b/doc/api/repl.md
index 1b6013cf4ca4ed..2421ad687c6bb5 100644
--- a/doc/api/repl.md
+++ b/doc/api/repl.md
@@ -386,33 +386,33 @@ changes:
-->
* `options` {Object|string}
- * `prompt` {string} The input prompt to display. Defaults to `> `
+ * `prompt` {string} The input prompt to display. **Default:** `> `.
(with a trailing space).
- * `input` {stream.Readable} The Readable stream from which REPL input will be read.
- Defaults to `process.stdin`.
+ * `input` {stream.Readable} The Readable stream from which REPL input will be
+ read. **Default:** `process.stdin`.
* `output` {stream.Writable} The Writable stream to which REPL output will be
- written. Defaults to `process.stdout`.
+ written. **Default:** `process.stdout`.
* `terminal` {boolean} If `true`, specifies that the `output` should be
treated as a TTY terminal, and have ANSI/VT100 escape codes written to it.
- Defaults to checking the value of the `isTTY` property on the `output`
+ **Default:** checking the value of the `isTTY` property on the `output`
stream upon instantiation.
* `eval` {Function} The function to be used when evaluating each given line
- of input. Defaults to an async wrapper for the JavaScript `eval()`
+ of input. **Default:** an async wrapper for the JavaScript `eval()`
function. An `eval` function can error with `repl.Recoverable` to indicate
the input was incomplete and prompt for additional lines.
* `useColors` {boolean} If `true`, specifies that the default `writer`
function should include ANSI color styling to REPL output. If a custom
- `writer` function is provided then this has no effect. Defaults to the
+ `writer` function is provided then this has no effect. **Default:** the
REPL instances `terminal` value.
* `useGlobal` {boolean} If `true`, specifies that the default evaluation
function will use the JavaScript `global` as the context as opposed to
creating a new separate context for the REPL instance. The node CLI REPL
- sets this value to `true`. Defaults to `false`.
+ sets this value to `true`. **Default:** `false`.
* `ignoreUndefined` {boolean} If `true`, specifies that the default writer
will not output the return value of a command if it evaluates to
- `undefined`. Defaults to `false`.
+ `undefined`. **Default:** `false`.
* `writer` {Function} The function to invoke to format the output of each
- command before writing to `output`. Defaults to [`util.inspect()`][].
+ command before writing to `output`. **Default:** [`util.inspect()`][].
* `completer` {Function} An optional function used for custom Tab auto
completion. See [`readline.InterfaceCompleter`][] for an example.
* `replMode` {symbol} A flag that specifies whether the default evaluator
@@ -426,7 +426,7 @@ changes:
equivalent to `repl.REPL_MODE_SLOPPY` (documented above).
* `breakEvalOnSigint` - Stop evaluating the current piece of code when
`SIGINT` is received, i.e. `Ctrl+C` is pressed. This cannot be used together
- with a custom `eval` function. Defaults to `false`.
+ with a custom `eval` function. **Default:** `false`.
The `repl.start()` method creates and starts a `repl.REPLServer` instance.
@@ -469,11 +469,12 @@ environment variables:
will be saved to the specified file rather than `.node_repl_history` in the
user's home directory. Setting this value to `''` will disable persistent
REPL history. Whitespace will be trimmed from the value.
- - `NODE_REPL_HISTORY_SIZE` - Defaults to `1000`. Controls how many lines of
- history will be persisted if history is available. Must be a positive number.
- - `NODE_REPL_MODE` - May be any of `sloppy`, `strict`, or `magic`. Defaults
- to `sloppy`, which will allow non-strict mode code to be run. `magic` is
- **deprecated** and treated as an alias of `sloppy`.
+ - `NODE_REPL_HISTORY_SIZE` - Controls how many lines of history will be
+ persisted if history is available. Must be a positive number.
+ **Default:** `1000`.
+ - `NODE_REPL_MODE` - May be any of `sloppy`, `strict`, or `magic`. `magic` is
+ **deprecated** and treated as an alias of `sloppy`. **Default:** `sloppy`,
+ which will allow non-strict mode code to be run.
### Persistent History
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 6b51585e691f93..ec980230504656 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -839,7 +839,7 @@ added: v0.9.4
* `destination` {stream.Writable} The destination for writing data
* `options` {Object} Pipe options
- * `end` {boolean} End the writer when the reader ends. Defaults to `true`.
+ * `end` {boolean} End the writer when the reader ends. **Default:** `true`.
The `readable.pipe()` method attaches a [Writable][] stream to the `readable`,
causing it to switch automatically into flowing mode and push all of its data
@@ -1319,16 +1319,16 @@ constructor and implement the `writable._write()` method. The
* `options` {Object}
* `highWaterMark` {number} Buffer level when
- [`stream.write()`][stream-write] starts returning `false`. Defaults to
+ [`stream.write()`][stream-write] starts returning `false`. **Default:**
`16384` (16kb), or `16` for `objectMode` streams.
* `decodeStrings` {boolean} Whether or not to decode strings into
Buffers before passing them to [`stream._write()`][stream-_write].
- Defaults to `true`
+ **Default:** `true`.
* `objectMode` {boolean} Whether or not the
[`stream.write(anyObj)`][stream-write] is a valid operation. When set,
it becomes possible to write JavaScript values other than string,
`Buffer` or `Uint8Array` if supported by the stream implementation.
- Defaults to `false`
+ **Default:** `false`.
* `write` {Function} Implementation for the
[`stream._write()`][stream-_write] method.
* `writev` {Function} Implementation for the
@@ -1580,12 +1580,12 @@ constructor and implement the `readable._read()` method.
* `options` {Object}
* `highWaterMark` {number} The maximum [number of bytes][hwm-gotcha] to store
in the internal buffer before ceasing to read from the underlying resource.
- Defaults to `16384` (16kb), or `16` for `objectMode` streams
+ **Default:** `16384` (16kb), or `16` for `objectMode` streams.
* `encoding` {string} If specified, then buffers will be decoded to
- strings using the specified encoding. Defaults to `null`
+ strings using the specified encoding. **Default:** `null`.
* `objectMode` {boolean} Whether this stream should behave
as a stream of objects. Meaning that [`stream.read(n)`][stream-read] returns
- a single value instead of a Buffer of size n. Defaults to `false`
+ a single value instead of a Buffer of size n. **Default:** `false`.
* `read` {Function} Implementation for the [`stream._read()`][stream-_read]
method.
* `destroy` {Function} Implementation for the [`stream._destroy()`][readable-_destroy]
@@ -1829,15 +1829,13 @@ changes:
* `options` {Object} Passed to both Writable and Readable
constructors. Also has the following fields:
- * `allowHalfOpen` {boolean} Defaults to `true`. If set to `false`, then
- the stream will automatically end the writable side when the
- readable side ends.
- * `readableObjectMode` {boolean} Defaults to `false`. Sets `objectMode`
- for readable side of the stream. Has no effect if `objectMode`
- is `true`.
- * `writableObjectMode` {boolean} Defaults to `false`. Sets `objectMode`
- for writable side of the stream. Has no effect if `objectMode`
- is `true`.
+ * `allowHalfOpen` {boolean} If set to `false`, then the stream will
+ automatically end the writable side when the readable side ends.
+ **Default:** `true`.
+ * `readableObjectMode` {boolean} Sets `objectMode` for readable side of the
+ stream. Has no effect if `objectMode` is `true`. **Default:** `false`.
+ * `writableObjectMode` {boolean} Sets `objectMode` for writable side of the
+ stream. Has no effect if `objectMode` is `true`. **Default:** `false`.
* `readableHighWaterMark` {number} Sets `highWaterMark` for the readable side
of the stream. Has no effect if `highWaterMark` is provided.
* `writableHighWaterMark` {number} Sets `highWaterMark` for the writable side
diff --git a/doc/api/string_decoder.md b/doc/api/string_decoder.md
index cde81e6ae5ec2b..224d208e9cc889 100644
--- a/doc/api/string_decoder.md
+++ b/doc/api/string_decoder.md
@@ -48,7 +48,7 @@ added: v0.1.99
-->
* `encoding` {string} The character encoding the `StringDecoder` will use.
- Defaults to `'utf8'`.
+ **Default:** `'utf8'`.
Creates a new `StringDecoder` instance.
diff --git a/doc/api/tls.md b/doc/api/tls.md
index 619c2e571449ca..bcc820e5fd72b6 100644
--- a/doc/api/tls.md
+++ b/doc/api/tls.md
@@ -134,9 +134,9 @@ An `'error'` event is emitted on the [`tls.TLSSocket`][] instance when this
threshold is exceeded. The limits are configurable:
* `tls.CLIENT_RENEG_LIMIT` {number} Specifies the number of renegotiation
- requests. Defaults to `3`.
+ requests. **Default:** `3`.
* `tls.CLIENT_RENEG_WINDOW` {number} Specifies the time renegotiation window
- in seconds. Defaults to `600` (10 minutes).
+ in seconds. **Default:** `600` (10 minutes).
*Note*: The default renegotiation limits should not be modified without a full
understanding of the implications and risks.
@@ -462,7 +462,7 @@ changes:
* `options` {Object}
* `isServer`: The SSL/TLS protocol is asymmetrical, TLSSockets must know if
they are to behave as a server or a client. If `true` the TLS socket will be
- instantiated as a server. Defaults to `false`.
+ instantiated as a server. **Default:** `false`.
* `server` {net.Server} An optional [`net.Server`][] instance.
* `requestCert`: Whether to authenticate the remote peer by requesting a
certificate. Clients always request a server certificate. Servers
@@ -743,9 +743,9 @@ added: v0.11.8
-->
* `options` {Object}
- * `rejectUnauthorized` {boolean} If not `false`, the server certificate is verified
- against the list of supplied CAs. An `'error'` event is emitted if
- verification fails; `err.code` contains the OpenSSL error code. Defaults to
+ * `rejectUnauthorized` {boolean} If not `false`, the server certificate is
+ verified against the list of supplied CAs. An `'error'` event is emitted if
+ verification fails; `err.code` contains the OpenSSL error code. **Default:**
`true`.
* `requestCert`
* `callback` {Function} A function that will be called when the renegotiation
@@ -766,8 +766,8 @@ after `handshakeTimeout` timeout.
added: v0.11.11
-->
-* `size` {number} The maximum TLS fragment size. Defaults to `16384`. The
- maximum value is `16384`.
+* `size` {number} The maximum TLS fragment size. The maximum value is `16384`.
+ **Default:** `16384`.
The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size.
Returns `true` if setting the limit succeeded; `false` otherwise.
@@ -848,7 +848,8 @@ changes:
-->
* `options` {Object}
- * `host` {string} Host the client should connect to, defaults to 'localhost'.
+ * `host` {string} Host the client should connect to. **Default:**
+ `'localhost'`.
* `port` {number} Port the client should connect to.
* `path` {string} Creates unix socket connection to path. If this option is
specified, `host` and `port` are ignored.
@@ -861,9 +862,9 @@ changes:
connection/disconnection/destruction of `socket` is the user's
responsibility, calling `tls.connect()` will not cause `net.connect()` to be
called.
- * `rejectUnauthorized` {boolean} If not `false`, the server certificate is verified
- against the list of supplied CAs. An `'error'` event is emitted if
- verification fails; `err.code` contains the OpenSSL error code. Defaults to
+ * `rejectUnauthorized` {boolean} If not `false`, the server certificate is
+ verified against the list of supplied CAs. An `'error'` event is emitted if
+ verification fails; `err.code` contains the OpenSSL error code. **Default:**
`true`.
* `NPNProtocols` {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array}
An array of strings, `Buffer`s or `Uint8Array`s, or a single `Buffer` or
@@ -889,12 +890,13 @@ changes:
* `minDHSize` {number} Minimum size of the DH parameter in bits to accept a
TLS connection. When a server offers a DH parameter with a size less
than `minDHSize`, the TLS connection is destroyed and an error is thrown.
- Defaults to `1024`.
+ **Default:** `1024`.
* `secureContext`: Optional TLS context object created with
[`tls.createSecureContext()`][]. If a `secureContext` is _not_ provided, one
will be created by passing the entire `options` object to
`tls.createSecureContext()`.
- * `lookup`: {Function} Custom lookup function. Defaults to [`dns.lookup()`][].
+ * `lookup`: {Function} Custom lookup function. **Default:**
+ [`dns.lookup()`][].
* ...: Optional [`tls.createSecureContext()`][] options that are used if the
`secureContext` option is missing, otherwise they are ignored.
* `callback` {Function}
@@ -1060,10 +1062,10 @@ changes:
* `ecdhCurve` {string} A string describing a named curve or a colon separated
list of curve NIDs or names, for example `P-521:P-384:P-256`, to use for
ECDH key agreement, or `false` to disable ECDH. Set to `auto` to select the
- curve automatically. Defaults to [`tls.DEFAULT_ECDH_CURVE`]. Use
- [`crypto.getCurves()`][] to obtain a list of available curve names. On
- recent releases, `openssl ecparam -list_curves` will also display the name
- and description of each available elliptic curve.
+ curve automatically. Use [`crypto.getCurves()`][] to obtain a list of
+ available curve names. On recent releases, `openssl ecparam -list_curves`
+ will also display the name and description of each available elliptic curve.
+ **Default:** [`tls.DEFAULT_ECDH_CURVE`].
* `dhparam` {string|Buffer} Diffie Hellman parameters, required for
[Perfect Forward Secrecy][]. Use `openssl dhparam` to create the parameters.
The key length must be greater than or equal to 1024 bits, otherwise an
@@ -1116,15 +1118,15 @@ changes:
* `options` {Object}
* `handshakeTimeout` {number} Abort the connection if the SSL/TLS handshake
- does not finish in the specified number of milliseconds. Defaults to `120`
- seconds. A `'tlsClientError'` is emitted on the `tls.Server` object whenever
- a handshake times out.
+ does not finish in the specified number of milliseconds.
+ A `'tlsClientError'` is emitted on the `tls.Server` object whenever
+ a handshake times out. **Default:** `120000` (120 seconds).
* `requestCert` {boolean} If `true` the server will request a certificate from
- clients that connect and attempt to verify that certificate. Defaults to
+ clients that connect and attempt to verify that certificate. **Default:**
`false`.
* `rejectUnauthorized` {boolean} If not `false` the server will reject any
connection which is not authorized with the list of supplied CAs. This
- option only has an effect if `requestCert` is `true`. Defaults to `true`.
+ option only has an effect if `requestCert` is `true`. **Default:** `true`.
* `NPNProtocols` {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array}
An array of strings, `Buffer`s or `Uint8Array`s, or a single `Buffer` or
`Uint8Array` containing supported NPN protocols. `Buffer`s should have the
@@ -1318,7 +1320,7 @@ changes:
* `secureContext`: An optional TLS context object from
[`tls.createSecureContext()`][]
* `isServer`: If `true` the TLS socket will be instantiated in server-mode.
- Defaults to `false`.
+ **Default:** `false`.
* `server` {net.Server} An optional [`net.Server`][] instance
* `requestCert`: Optional, see [`tls.createServer()`][]
* `rejectUnauthorized`: Optional, see [`tls.createServer()`][]
diff --git a/doc/api/url.md b/doc/api/url.md
index 4d7fb9c8f45b83..7eb410c5612d53 100644
--- a/doc/api/url.md
+++ b/doc/api/url.md
@@ -815,14 +815,14 @@ added: v7.6.0
* `URL` {URL} A [WHATWG URL][] object
* `options` {Object}
* `auth` {boolean} `true` if the serialized URL string should include the
- username and password, `false` otherwise. Defaults to `true`.
+ username and password, `false` otherwise. **Default:** `true`.
* `fragment` {boolean} `true` if the serialized URL string should include the
- fragment, `false` otherwise. Defaults to `true`.
+ fragment, `false` otherwise. **Default:** `true`.
* `search` {boolean} `true` if the serialized URL string should include the
- search query, `false` otherwise. Defaults to `true`.
+ search query, `false` otherwise. **Default:** `true`.
* `unicode` {boolean} `true` if Unicode characters appearing in the host
component of the URL string should be encoded directly as opposed to being
- Punycode encoded. Defaults to `false`.
+ Punycode encoded. **Default:** `false`.
Returns a customizable serialization of a URL String representation of a
[WHATWG URL][] object.
@@ -1055,12 +1055,12 @@ changes:
* `parseQueryString` {boolean} If `true`, the `query` property will always
be set to an object returned by the [`querystring`][] module's `parse()`
method. If `false`, the `query` property on the returned URL object will be an
- unparsed, undecoded string. Defaults to `false`.
+ unparsed, undecoded string. **Default:** `false`.
* `slashesDenoteHost` {boolean} If `true`, the first token after the literal
string `//` and preceding the next `/` will be interpreted as the `host`.
For instance, given `//foo/bar`, the result would be
`{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
- Defaults to `false`.
+ **Default:** `false`.
The `url.parse()` method takes a URL string, parses it, and returns a URL
object.
diff --git a/doc/api/util.md b/doc/api/util.md
index 490895c000a507..b806d8ca602f3e 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -326,26 +326,26 @@ changes:
* `object` {any} Any JavaScript primitive or Object.
* `options` {Object}
* `showHidden` {boolean} If `true`, the `object`'s non-enumerable symbols and
- properties will be included in the formatted result. Defaults to `false`.
+ properties will be included in the formatted result. **Default:** `false`.
* `depth` {number} Specifies the number of times to recurse while formatting
the `object`. This is useful for inspecting large complicated objects.
Defaults to `2`. To make it recurse indefinitely pass `null`.
* `colors` {boolean} If `true`, the output will be styled with ANSI color
- codes. Defaults to `false`. Colors are customizable, see
- [Customizing `util.inspect` colors][].
+ codes. Colors are customizable, see [Customizing `util.inspect` colors][].
+ **Default:** `false`.
* `customInspect` {boolean} If `false`, then custom `inspect(depth, opts)`
functions exported on the `object` being inspected will not be called.
- Defaults to `true`.
+ **Default:** `true`.
* `showProxy` {boolean} If `true`, then objects and functions that are
`Proxy` objects will be introspected to show their `target` and `handler`
- objects. Defaults to `false`.
+ objects. **Default:** `false`.
* `maxArrayLength` {number} Specifies the maximum number of array and
- `TypedArray` elements to include when formatting. Defaults to `100`. Set to
- `null` to show all array elements. Set to `0` or negative to show no array
- elements.
+ `TypedArray` elements to include when formatting. Set to `null` to show all
+ array elements. Set to `0` or negative to show no array elements.
+ **Default:** `100`.
* `breakLength` {number} The length at which an object's keys are split
across multiple lines. Set to `Infinity` to format an object as a single
- line. Defaults to 60 for legacy compatibility.
+ line. **Default:** `60` for legacy compatibility.
The `util.inspect()` method returns a string representation of `object` that is
primarily useful for debugging. Additional `options` may be passed that alter
@@ -658,15 +658,15 @@ is not supported.
### new TextDecoder([encoding[, options]])
* `encoding` {string} Identifies the `encoding` that this `TextDecoder` instance
- supports. Defaults to `'utf-8'`.
+ supports. **Default:** `'utf-8'`.
* `options` {Object}
- * `fatal` {boolean} `true` if decoding failures are fatal. Defaults to
- `false`. This option is only supported when ICU is enabled (see
- [Internationalization][]).
+ * `fatal` {boolean} `true` if decoding failures are fatal. This option is only
+ supported when ICU is enabled (see [Internationalization][]). **Default:**
+ `false`.
* `ignoreBOM` {boolean} When `true`, the `TextDecoder` will include the byte
order mark in the decoded result. When `false`, the byte order mark will
be removed from the output. This option is only used when `encoding` is
- `'utf-8'`, `'utf-16be'` or `'utf-16le'`. Defaults to `false`.
+ `'utf-8'`, `'utf-16be'` or `'utf-16le'`. **Default:** `false`.
Creates an new `TextDecoder` instance. The `encoding` may specify one of the
supported encodings or an alias.
@@ -677,7 +677,7 @@ supported encodings or an alias.
Typed Array instance containing the encoded data.
* `options` {Object}
* `stream` {boolean} `true` if additional chunks of data are expected.
- Defaults to `false`.
+ **Default:** `false`.
* Returns: {string}
Decodes the `input` and returns a string. If `options.stream` is `true`, any
@@ -722,7 +722,7 @@ const uint8array = encoder.encode('this is some data');
### textEncoder.encode([input])
-* `input` {string} The text to encode. Defaults to an empty string.
+* `input` {string} The text to encode. **Default:** an empty string.
* Returns: {Uint8Array}
UTF-8 encodes the `input` string and returns a `Uint8Array` containing the
diff --git a/doc/api/v8.md b/doc/api/v8.md
index 63a4ded9fe96ea..81a8769dc6a14d 100644
--- a/doc/api/v8.md
+++ b/doc/api/v8.md
@@ -288,13 +288,11 @@ by subclasses.
#### serializer.\_setTreatArrayBufferViewsAsHostObjects(flag)
-* `flag` {boolean}
+* `flag` {boolean} **Default:** `false`
Indicate whether to treat `TypedArray` and `DataView` objects as
host objects, i.e. pass them to [`serializer._writeHostObject()`][].
-The default is not to treat those objects as host objects.
-
### class: v8.Deserializer
-`kind` defaults to `zlib.constants.Z_FULL_FLUSH`.
+* `kind` **Default:** `zlib.constants.Z_FULL_FLUSH`
Flush pending data. Don't call this frivolously, premature flushes negatively
impact the effectiveness of the compression algorithm.
diff --git a/tools/doc/json.js b/tools/doc/json.js
index 87122cea70fd56..fe0d9526f5b7e6 100644
--- a/tools/doc/json.js
+++ b/tools/doc/json.js
@@ -399,10 +399,10 @@ function parseListItem(item) {
}
text = text.trim();
- const defaultExpr = /\(default\s*[:=]?\s*['"`]?([^, '"`]*)['"`]?\)/i;
+ const defaultExpr = /\s*\*\*Default:\*\*\s*([^]+)$/i;
const def = text.match(defaultExpr);
if (def) {
- item.default = def[1];
+ item.default = def[1].replace(/\.$/, '');
text = text.replace(defaultExpr, '');
}