Permalink
Browse files

doc/tools: fix more type inconsistencies

- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
  • Loading branch information...
silverwind authored and italoacasas committed Mar 5, 2017
1 parent 5a9e30f commit 757bf484ff3390605246491545267f32ffb45804
View
@@ -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`.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -135,9 +135,9 @@ added: v0.1.90
understand the `-c` switch on UNIX or `/d /s /c` on Windows. On Windows,
command line parsing should be compatible with `cmd.exe`.)
* `timeout` {number} (Default: `0`)
- * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
+ * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
- * `killSignal` {string|Integer} (Default: `'SIGTERM'`)
+ * `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).)
* `callback` {Function} called with the output when process terminates
@@ -212,9 +212,9 @@ added: v0.1.91
* `env` {Object} Environment key-value pairs
* `encoding` {string} (Default: `'utf8'`)
* `timeout` {number} (Default: `0`)
- * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
+ * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
- * `killSignal` {string|Integer} (Default: `'SIGTERM'`)
+ * `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).)
* `callback` {Function} called with the output when process terminates
@@ -602,17 +602,17 @@ changes:
* `input` {string|Buffer} 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'`)
+ * `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
- `stderr` by default will be output to the parent process' stderr unless
`stdio` is specified
* `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`)
- * `killSignal` {string|Integer} The signal value to be used when the spawned
+ * `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`)
- * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
+ * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`)
* Returns: {Buffer|string} The stdout from the command
@@ -640,7 +640,7 @@ added: v0.11.12
* `input` {string|Buffer} 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'`)
+ * `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
- `stderr` by default will be output to the parent process' stderr unless
`stdio` is specified
* `env` {Object} Environment key-value pairs
@@ -652,9 +652,9 @@ added: v0.11.12
* `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`)
- * `killSignal` {string|Integer} The signal value to be used when the spawned
+ * `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`)
- * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
+ * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs.
(Default: `'buffer'`)
@@ -695,15 +695,15 @@ changes:
* `input` {string|Buffer} 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.
+ * `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`)
- * `killSignal` {string|Integer} The signal value to be used when the spawned
+ * `killSignal` {string|integer} The signal value to be used when the spawned
process will be killed. (Default: `'SIGTERM'`)
- * [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
+ * [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
stdout or stderr - if exceeded child process is killed
* `encoding` {string} The encoding used for all stdio inputs and outputs.
(Default: `'buffer'`)
@@ -833,7 +833,7 @@ IPC channel currently exists, this property is `undefined`.
added: v0.7.2
-->
-* {Boolean} Set to `false` after `child.disconnect()` is called
+* {boolean} Set to `false` after `child.disconnect()` is called
The `child.connected` property indicates whether it is still possible to send
and receive messages from a child process. When `child.connected` is `false`, it
@@ -920,7 +920,7 @@ setTimeout(() => {
added: v0.1.90
-->
-* {Number} Integer
+* {number} Integer
Returns the process identifier (PID) of the child process.
@@ -954,7 +954,7 @@ changes:
* `sendHandle` {Handle}
* `options` {Object}
* `callback` {Function}
-* Returns: {Boolean}
+* Returns: {boolean}
When an IPC channel has been established between the parent and child (
i.e. when using [`child_process.fork()`][]), the `child.send()` method can be
View
@@ -332,7 +332,7 @@ if (cluster.isMaster) {
added: v6.0.0
-->
-* {Boolean}
+* {boolean}
Set by calling `.kill()` or `.disconnect()`. Until then, it is `undefined`.
@@ -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`.
@@ -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
@@ -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`).
View
@@ -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
@@ -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
@@ -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`:
View
@@ -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
@@ -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`
@@ -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`
@@ -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`
@@ -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`
View
@@ -80,13 +80,13 @@ Alternatively, `options` can be an object containing these properties:
* `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.
View
@@ -243,7 +243,7 @@ new MyError().stack;
### Error.stackTraceLimit
-* {Number}
+* {number}
The `Error.stackTraceLimit` property specifies the number of stack frames
collected by a stack trace (whether generated by `new Error().stack` or
@@ -257,7 +257,7 @@ not capture any frames.
### error.message
-* {String}
+* {string}
The `error.message` property is the string description of the error as set by calling `new Error(message)`.
The `message` passed to the constructor will also appear in the first line of
@@ -273,7 +273,7 @@ console.error(err.message);
### error.stack
-* {String}
+* {string}
The `error.stack` property is a string describing the point in the code at which
the `Error` was instantiated.
@@ -449,14 +449,14 @@ added properties.
#### error.code
-* {String}
+* {string}
The `error.code` property is a string representing the error code, which is always
`E` followed by a sequence of capital letters.
#### error.errno
-* {String | Number}
+* {string|number}
The `error.errno` property is a number or a string.
The number is a **negative** value which corresponds to the error code defined in
@@ -466,27 +466,27 @@ In case of a string, it is the same as `error.code`.
#### error.syscall
-* {String}
+* {string}
The `error.syscall` property is a string describing the [syscall][] that failed.
#### error.path
-* {String}
+* {string}
When present (e.g. in `fs` or `child_process`), the `error.path` property is a string
containing a relevant invalid pathname.
#### error.address
-* {String}
+* {string}
When present (e.g. in `net` or `dgram`), the `error.address` property is a string
describing the address to which the connection failed.
#### error.port
-* {Number}
+* {number}
When present (e.g. in `net` or `dgram`), the `error.port` property is a number representing
the connection's port that is not available.
Oops, something went wrong.

0 comments on commit 757bf48

Please sign in to comment.