Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v7.x-staging backport) doc type fixes #11750

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/api/assert.md
Expand Up @@ -241,7 +241,7 @@ added: v0.1.21
* `actual` {any}
* `expected` {any}
* `message` {any}
* `operator` {String}
* `operator` {string}

Throws an `AssertionError`. If `message` is falsy, the error message is set as
the values of `actual` and `expected` separated by the provided `operator`.
Expand Down
280 changes: 140 additions & 140 deletions doc/api/buffer.md

Large diffs are not rendered by default.

164 changes: 82 additions & 82 deletions doc/api/child_process.md

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions doc/api/cluster.md
Expand Up @@ -148,8 +148,8 @@ In a worker you can also use `process.on('error')`.
added: v0.11.2
-->

* `code` {Number} the exit code, if it exited normally.
* `signal` {String} the name of the signal (e.g. `'SIGHUP'`) that caused
* `code` {number} the exit code, if it exited normally.
* `signal` {string} the name of the signal (e.g. `'SIGHUP'`) that caused
the process to be killed.

Similar to the `cluster.on('exit')` event, but specific to this worker.
Expand Down Expand Up @@ -332,7 +332,7 @@ if (cluster.isMaster) {
added: v6.0.0
-->

* {Boolean}
* {boolean}

Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`.

Expand All @@ -356,7 +356,7 @@ worker.kill();
added: v0.8.0
-->

* {Number}
* {number}

Each new worker is given its own unique id, this id is stored in the
`id`.
Expand Down Expand Up @@ -386,7 +386,7 @@ because of exiting or being signaled). Otherwise, it returns `false`.
added: v0.9.12
-->

* `signal` {String} Name of the kill signal to send to the worker
* `signal` {string} Name of the kill signal to send to the worker
process.

This function will kill the worker. In the master, it does this by disconnecting
Expand Down Expand Up @@ -514,8 +514,8 @@ added: v0.7.9
-->

* `worker` {cluster.Worker}
* `code` {Number} the exit code, if it exited normally.
* `signal` {String} the name of the signal (e.g. `'SIGHUP'`) that caused
* `code` {number} the exit code, if it exited normally.
* `signal` {string} the name of the signal (e.g. `'SIGHUP'`) that caused
the process to be killed.

When any of the workers die the cluster module will emit the `'exit'` event.
Expand Down Expand Up @@ -691,7 +691,7 @@ This can only be called from the master process.
added: v0.8.1
-->

* {Boolean}
* {boolean}

True if the process is a master. This is determined
by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is
Expand All @@ -702,7 +702,7 @@ undefined, then `isMaster` is `true`.
added: v0.6.0
-->

* {Boolean}
* {boolean}

True if the process is not a master (it is the negation of `cluster.isMaster`).

Expand Down Expand Up @@ -736,16 +736,16 @@ 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]`)
* `exec` {string} file path to worker file. (Default=`process.argv[1]`)
* `args` {Array} string arguments passed to worker.
(Default=`process.argv.slice(2)`)
* `silent` {Boolean} whether or not to send output to parent's stdio.
* `silent` {boolean} whether or not to send output to parent's stdio.
(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`.
* `uid` {Number} Sets the user identity of the process. (See setuid(2).)
* `gid` {Number} Sets the group identity of the process. (See setgid(2).)
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
* `gid` {number} Sets the group identity of the process. (See setgid(2).)

After calling `.setupMaster()` (or `.fork()`) this settings object will contain
the settings, including the default values.
Expand All @@ -762,10 +762,10 @@ changes:
-->

* `settings` {Object}
* `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.
(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.
(Default=`false`)
* `stdio` {Array} Configures the stdio of forked processes. When this option
is provided, it overrides `silent`.
Expand Down
10 changes: 5 additions & 5 deletions doc/api/console.md
Expand Up @@ -162,9 +162,9 @@ added: v0.1.101
-->
* `obj` {any}
* `options` {Object}
* `showHidden` {Boolean}
* `depth` {Number}
* `colors` {Boolean}
* `showHidden` {boolean}
* `depth` {number}
* `colors` {boolean}

Uses [`util.inspect()`][] on `obj` and prints the resulting string to `stdout`.
This function bypasses any custom `inspect()` function defined on `obj`. An
Expand Down Expand Up @@ -243,7 +243,7 @@ values are concatenated. See [`util.format()`][] for more information.
<!-- YAML
added: v0.1.104
-->
* `label` {String}
* `label` {string}

Starts a timer that can be used to compute the duration of an operation. Timers
are identified by a unique `label`. Use the same `label` when you call
Expand All @@ -259,7 +259,7 @@ changes:
description: This method no longer supports multiple calls that don’t map
to individual `console.time()` calls; see below for details.
-->
* `label` {String}
* `label` {string}

Stops a timer that was previously started by calling [`console.time()`][] and
prints the result to `stdout`:
Expand Down
20 changes: 10 additions & 10 deletions doc/api/crypto.md
Expand Up @@ -929,8 +929,8 @@ The `private_key` argument can be an object or a string. If `private_key` is a
string, it is treated as a raw key with no passphrase. If `private_key` is an
object, it is interpreted as a hash containing two properties:

* `key` : {String} - PEM encoded private key
* `passphrase` : {String} - passphrase for the private key
* `key`: {string} - PEM encoded private key
* `passphrase`: {string} - passphrase for the private key

The `output_format` can specify one of `'latin1'`, `'hex'` or `'base64'`. If
`output_format` is provided a string is returned; otherwise a [`Buffer`][] is
Expand Down Expand Up @@ -1469,8 +1469,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
If `private_key` is an object, it is interpreted as a hash object with the
keys:

* `key` : {String} - PEM encoded private key
* `passphrase` : {String} - Optional passphrase for the private key
* `key`: {string} - PEM encoded private key
* `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING`
Expand All @@ -1490,8 +1490,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
If `private_key` is an object, it is interpreted as a hash object with the
keys:

* `key` : {String} - PEM encoded private key
* `passphrase` : {String} - Optional passphrase for the private key
* `key`: {string} - PEM encoded private key
* `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING`
Expand All @@ -1510,8 +1510,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
If `public_key` is an object, it is interpreted as a hash object with the
keys:

* `key` : {String} - PEM encoded public key
* `passphrase` : {String} - Optional passphrase for the private key
* `key`: {string} - PEM encoded public key
* `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING`
Expand All @@ -1534,8 +1534,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
If `public_key` is an object, it is interpreted as a hash object with the
keys:

* `key` : {String} - PEM encoded public key
* `passphrase` : {String} - Optional passphrase for the private key
* `key`: {string} - PEM encoded public key
* `passphrase`: {string} - Optional passphrase for the private key
* `padding` : An optional padding value, one of the following:
* `crypto.constants.RSA_NO_PADDING`
* `crypto.constants.RSA_PKCS1_PADDING`
Expand Down
46 changes: 23 additions & 23 deletions doc/api/dgram.md
Expand Up @@ -74,18 +74,18 @@ The `'message'` event is emitted when a new datagram is available on a socket.
The event handler function is passed two arguments: `msg` and `rinfo`.
* `msg` {Buffer} - The message
* `rinfo` {Object} - Remote address information
* `address` {String} The sender address
* `family` {String} The address family (`'IPv4'` or `'IPv6'`)
* `port` {Number} The sender port
* `size` {Number} The message size
* `address` {string} The sender address
* `family` {string} The address family (`'IPv4'` or `'IPv6'`)
* `port` {number} The sender port
* `size` {number} The message size

### socket.addMembership(multicastAddress[, multicastInterface])
<!-- YAML
added: v0.6.9
-->

* `multicastAddress` {String}
* `multicastInterface` {String}, Optional
* `multicastAddress` {string}
* `multicastInterface` {string}, Optional

Tells the kernel to join a multicast group at the given `multicastAddress` and
`multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the
Expand All @@ -107,8 +107,8 @@ properties.
added: v0.1.99
-->

* `port` {Number} - Integer, Optional
* `address` {String}, Optional
* `port` {number} - Integer, Optional
* `address` {string}, Optional
* `callback` {Function} with no parameters, Optional. Called when
binding is complete.

Expand Down Expand Up @@ -160,9 +160,9 @@ added: v0.11.14
-->

* `options` {Object} - Required. Supports the following properties:
* `port` {Number} - Optional.
* `address` {String} - Optional.
* `exclusive` {Boolean} - Optional.
* `port` {number} - Optional.
* `address` {string} - Optional.
* `exclusive` {boolean} - Optional.
* `callback` {Function} - Optional.

For UDP sockets, causes the `dgram.Socket` to listen for datagram
Expand Down Expand Up @@ -214,8 +214,8 @@ provided, it is added as a listener for the [`'close'`][] event.
added: v0.6.9
-->

* `multicastAddress` {String}
* `multicastInterface` {String}, Optional
* `multicastAddress` {string}
* `multicastInterface` {string}, Optional

Instructs the kernel to leave a multicast group at `multicastAddress` using the
`IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
Expand Down Expand Up @@ -255,11 +255,11 @@ changes:
and `length` parameters are optional now.
-->

* `msg` {Buffer|String|Array} Message to be sent
* `offset` {Number} Integer. Optional. Offset in the buffer where the message starts.
* `length` {Number} Integer. Optional. Number of bytes in the message.
* `port` {Number} Integer. Destination port.
* `address` {String} Destination hostname or IP address.
* `msg` {Buffer|string|array} Message to be sent
* `offset` {number} Integer. Optional. Offset in the buffer where the message starts.
* `length` {number} Integer. Optional. Number of bytes in the message.
* `port` {number} Integer. Destination port.
* `address` {string} Destination hostname or IP address.
* `callback` {Function} Called when the message has been sent. Optional.

Broadcasts a datagram on the socket. The destination `port` and `address` must
Expand Down Expand Up @@ -355,7 +355,7 @@ source that the data did not reach its intended recipient.
added: v0.6.9
-->

* `flag` {Boolean}
* `flag` {boolean}

Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
packets may be sent to a local interface's broadcast address.
Expand All @@ -365,7 +365,7 @@ packets may be sent to a local interface's broadcast address.
added: v0.3.8
-->

* `flag` {Boolean}
* `flag` {boolean}

Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
multicast packets will also be received on the local interface.
Expand All @@ -375,7 +375,7 @@ multicast packets will also be received on the local interface.
added: v0.3.8
-->

* `ttl` {Number} Integer
* `ttl` {number} Integer

Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
"Time to Live", in this context it specifies the number of IP hops that a
Expand All @@ -391,7 +391,7 @@ between 0 and 255. The default on most systems is `1` but can vary.
added: v0.1.101
-->

* `ttl` {Number} Integer
* `ttl` {number} Integer

Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
in this context it specifies the number of IP hops that a packet is allowed to
Expand Down Expand Up @@ -472,7 +472,7 @@ and `udp6` sockets). The bound address and port can be retrieved using
added: v0.1.99
-->

* `type` {String} - Either 'udp4' or 'udp6'
* `type` {string} - Either 'udp4' or 'udp6'
* `callback` {Function} - Attached as a listener to `'message'` events.
Optional
* Returns: {dgram.Socket}
Expand Down
14 changes: 7 additions & 7 deletions doc/api/dns.md
Expand Up @@ -78,15 +78,15 @@ an integer, then it must be `4` or `6`.

Alternatively, `options` can be an object containing these properties:

* `family` {Number} - The record family. If present, must be the integer
* `family` {number} - The record family. If present, must be the integer
`4` or `6`. If not provided, both IP v4 and v6 addresses are accepted.
* `hints`: {Number} - If present, it should be one or more of the supported
* `hints`: {number} - If present, it should be one or more of the supported
`getaddrinfo` flags. If `hints` is not provided, then no flags are passed to
`getaddrinfo`. Multiple flags can be passed through `hints` by bitwise
`OR`ing their values.
See [supported `getaddrinfo` flags][] for more information on supported
flags.
* `all`: {Boolean} - When `true`, the callback returns all resolved addresses
* `all`: {boolean} - When `true`, the callback returns all resolved addresses
in an array, otherwise returns a single address. Defaults to `false`.

All properties are optional.
Expand Down Expand Up @@ -214,9 +214,9 @@ Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the
will contain an array of IPv4 addresses (e.g.
`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).

* `hostname` {String} Hostname to resolve.
* `hostname` {string} Hostname to resolve.
* `options` {Object}
* `ttl` {Boolean} Retrieve the Time-To-Live value (TTL) of each record.
* `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record.
The callback receives an array of `{ address: '1.2.3.4', ttl: 60 }` objects
rather than an array of strings. The TTL is expressed in seconds.
* `callback` {Function} An `(err, result)` callback function.
Expand All @@ -235,9 +235,9 @@ Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the
`hostname`. The `addresses` argument passed to the `callback` function
will contain an array of IPv6 addresses.

* `hostname` {String} Hostname to resolve.
* `hostname` {string} Hostname to resolve.
* `options` {Object}
* `ttl` {Boolean} Retrieve the Time-To-Live value (TTL) of each record.
* `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record.
The callback receives an array of `{ address: '0:1:2:3:4:5:6:7', ttl: 60 }`
objects rather than an array of strings. The TTL is expressed in seconds.
* `callback` {Function} An `(err, result)` callback function.
Expand Down