Skip to content

Commit 59dd83e

Browse files
silverwindgibfahn
authored andcommitted
doc/tools: fix more type inconsistencies
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: #11697 Backport-PR-URL: #13054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Timothy Gu <[email protected]>
1 parent 5fd1593 commit 59dd83e

17 files changed

+201
-300
lines changed

doc/api/assert.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ added: v0.1.21
199199
* `actual` {any}
200200
* `expected` {any}
201201
* `message` {any}
202-
* `operator` {String}
202+
* `operator` {string}
203203

204204
Throws an `AssertionError`. If `message` is falsy, the error message is set as
205205
the values of `actual` and `expected` separated by the provided `operator`.

doc/api/buffer.md

+95-195
Large diffs are not rendered by default.

doc/api/child_process.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ added: v0.1.90
135135
understand the `-c` switch on UNIX or `/s /c` on Windows. On Windows,
136136
command line parsing should be compatible with `cmd.exe`.)
137137
* `timeout` {number} (Default: `0`)
138-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
138+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
139139
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
140-
* `killSignal` {string|Integer} (Default: `'SIGTERM'`)
140+
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
141141
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
142142
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
143143
* `callback` {Function} called with the output when process terminates
@@ -212,9 +212,9 @@ added: v0.1.91
212212
* `env` {Object} Environment key-value pairs
213213
* `encoding` {string} (Default: `'utf8'`)
214214
* `timeout` {number} (Default: `0`)
215-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
215+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
216216
stdout or stderr - if exceeded child process is killed (Default: `200*1024`)
217-
* `killSignal` {string|Integer} (Default: `'SIGTERM'`)
217+
* `killSignal` {string|integer} (Default: `'SIGTERM'`)
218218
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
219219
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
220220
* `callback` {Function} called with the output when process terminates
@@ -583,17 +583,17 @@ added: v0.11.12
583583
* `input` {string|Buffer} The value which will be passed as stdin to the
584584
spawned process
585585
- supplying this value will override `stdio[0]`
586-
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`)
586+
* `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
587587
- `stderr` by default will be output to the parent process' stderr unless
588588
`stdio` is specified
589589
* `env` {Object} Environment key-value pairs
590590
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
591591
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
592592
* `timeout` {number} In milliseconds the maximum amount of time the process
593593
is allowed to run. (Default: `undefined`)
594-
* `killSignal` {string|Integer} The signal value to be used when the spawned
594+
* `killSignal` {string|integer} The signal value to be used when the spawned
595595
process will be killed. (Default: `'SIGTERM'`)
596-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
596+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
597597
stdout or stderr - if exceeded child process is killed
598598
* `encoding` {string} The encoding used for all stdio inputs and outputs. (Default: `'buffer'`)
599599
* Returns: {Buffer|string} The stdout from the command
@@ -621,7 +621,7 @@ added: v0.11.12
621621
* `input` {string|Buffer} The value which will be passed as stdin to the
622622
spawned process
623623
- supplying this value will override `stdio[0]`
624-
* `stdio` {string | Array} Child's stdio configuration. (Default: `'pipe'`)
624+
* `stdio` {string|Array} Child's stdio configuration. (Default: `'pipe'`)
625625
- `stderr` by default will be output to the parent process' stderr unless
626626
`stdio` is specified
627627
* `env` {Object} Environment key-value pairs
@@ -633,9 +633,9 @@ added: v0.11.12
633633
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
634634
* `timeout` {number} In milliseconds the maximum amount of time the process
635635
is allowed to run. (Default: `undefined`)
636-
* `killSignal` {string|Integer} The signal value to be used when the spawned
636+
* `killSignal` {string|integer} The signal value to be used when the spawned
637637
process will be killed. (Default: `'SIGTERM'`)
638-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
638+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
639639
stdout or stderr - if exceeded child process is killed
640640
* `encoding` {string} The encoding used for all stdio inputs and outputs.
641641
(Default: `'buffer'`)
@@ -669,15 +669,15 @@ added: v0.11.12
669669
* `input` {string|Buffer} The value which will be passed as stdin to the
670670
spawned process
671671
- supplying this value will override `stdio[0]`
672-
* `stdio` {string | Array} Child's stdio configuration.
672+
* `stdio` {string|Array} Child's stdio configuration.
673673
* `env` {Object} Environment key-value pairs
674674
* `uid` {number} Sets the user identity of the process. (See setuid(2).)
675675
* `gid` {number} Sets the group identity of the process. (See setgid(2).)
676676
* `timeout` {number} In milliseconds the maximum amount of time the process
677677
is allowed to run. (Default: `undefined`)
678-
* `killSignal` {string|Integer} The signal value to be used when the spawned
678+
* `killSignal` {string|integer} The signal value to be used when the spawned
679679
process will be killed. (Default: `'SIGTERM'`)
680-
* [`maxBuffer`][] {Number} largest amount of data (in bytes) allowed on
680+
* [`maxBuffer`][] {number} largest amount of data (in bytes) allowed on
681681
stdout or stderr - if exceeded child process is killed
682682
* `encoding` {string} The encoding used for all stdio inputs and outputs.
683683
(Default: `'buffer'`)
@@ -797,7 +797,7 @@ to send messages.
797797
added: v0.7.2
798798
-->
799799

800-
* {Boolean} Set to `false` after `child.disconnect()` is called
800+
* {boolean} Set to `false` after `child.disconnect()` is called
801801

802802
The `child.connected` property indicates whether it is still possible to send
803803
and receive messages from a child process. When `child.connected` is `false`, it
@@ -884,7 +884,7 @@ setTimeout(() => {
884884
added: v0.1.90
885885
-->
886886

887-
* {Number} Integer
887+
* {number} Integer
888888

889889
Returns the process identifier (PID) of the child process.
890890

@@ -907,7 +907,7 @@ added: v0.5.9
907907
* `sendHandle` {Handle}
908908
* `options` {Object}
909909
* `callback` {Function}
910-
* Returns: {Boolean}
910+
* Returns: {boolean}
911911

912912
When an IPC channel has been established between the parent and child (
913913
i.e. when using [`child_process.fork()`][]), the `child.send()` method can be

doc/api/cluster.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ if (cluster.isMaster) {
328328
added: v6.0.0
329329
-->
330330

331-
* {Boolean}
331+
* {boolean}
332332

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

@@ -352,7 +352,7 @@ worker.kill();
352352
added: v0.8.0
353353
-->
354354

355-
* {Number}
355+
* {number}
356356

357357
Each new worker is given its own unique id, this id is stored in the
358358
`id`.
@@ -672,7 +672,7 @@ This can only be called from the master process.
672672
added: v0.8.1
673673
-->
674674

675-
* {Boolean}
675+
* {boolean}
676676

677677
True if the process is a master. This is determined
678678
by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` is
@@ -683,7 +683,7 @@ undefined, then `isMaster` is `true`.
683683
added: v0.6.0
684684
-->
685685

686-
* {Boolean}
686+
* {boolean}
687687

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

doc/api/crypto.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,8 @@ The `private_key` argument can be an object or a string. If `private_key` is a
901901
string, it is treated as a raw key with no passphrase. If `private_key` is an
902902
object, it is interpreted as a hash containing two properties:
903903

904-
* `key` : {String} - PEM encoded private key
905-
* `passphrase` : {String} - passphrase for the private key
904+
* `key`: {string} - PEM encoded private key
905+
* `passphrase`: {string} - passphrase for the private key
906906

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

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

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

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

1494-
* `key` : {String} - PEM encoded public key
1495-
* `passphrase` : {String} - Optional passphrase for the private key
1494+
* `key`: {string} - PEM encoded public key
1495+
* `passphrase`: {string} - Optional passphrase for the private key
14961496
* `padding` : An optional padding value, one of the following:
14971497
* `crypto.constants.RSA_NO_PADDING`
14981498
* `crypto.constants.RSA_PKCS1_PADDING`

doc/api/dns.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ Alternatively, `options` can be an object containing these properties:
7676

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

8888
All properties are optional.

doc/api/errors.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ new MyError().stack;
244244

245245
### Error.stackTraceLimit
246246

247-
* {Number}
247+
* {number}
248248

249249
The `Error.stackTraceLimit` property specifies the number of stack frames
250250
collected by a stack trace (whether generated by `new Error().stack` or
@@ -258,7 +258,7 @@ not capture any frames.
258258

259259
### error.message
260260

261-
* {String}
261+
* {string}
262262

263263
The `error.message` property is the string description of the error as set by calling `new Error(message)`.
264264
The `message` passed to the constructor will also appear in the first line of
@@ -274,7 +274,7 @@ console.error(err.message);
274274

275275
### error.stack
276276

277-
* {String}
277+
* {string}
278278

279279
The `error.stack` property is a string describing the point in the code at which
280280
the `Error` was instantiated.
@@ -450,14 +450,14 @@ added properties.
450450

451451
#### error.code
452452

453-
* {String}
453+
* {string}
454454

455455
The `error.code` property is a string representing the error code, which is always
456456
`E` followed by a sequence of capital letters.
457457

458458
#### error.errno
459459

460-
* {String | Number}
460+
* {string|number}
461461

462462
The `error.errno` property is a number or a string.
463463
The number is a **negative** value which corresponds to the error code defined in
@@ -467,27 +467,27 @@ In case of a string, it is the same as `error.code`.
467467

468468
#### error.syscall
469469

470-
* {String}
470+
* {string}
471471

472472
The `error.syscall` property is a string describing the [syscall][] that failed.
473473

474474
#### error.path
475475

476-
* {String}
476+
* {string}
477477

478478
When present (e.g. in `fs` or `child_process`), the `error.path` property is a string
479479
containing a relevant invalid pathname.
480480

481481
#### error.address
482482

483-
* {String}
483+
* {string}
484484

485485
When present (e.g. in `net` or `dgram`), the `error.address` property is a string
486486
describing the address to which the connection failed.
487487

488488
#### error.port
489489

490-
* {Number}
490+
* {number}
491491

492492
When present (e.g. in `net` or `dgram`), the `error.port` property is a number representing
493493
the connection's port that is not available.

doc/api/globals.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ added: v0.1.27
2727

2828
<!-- type=var -->
2929

30-
* {String}
30+
* {string}
3131

3232
The directory name of the current module. This the same as the
3333
[`path.dirname()`][] of the [`__filename`][].
@@ -50,7 +50,7 @@ added: v0.0.1
5050

5151
<!-- type=var -->
5252

53-
* {String}
53+
* {string}
5454

5555
The file name of the current module. This is the resolved absolute path of the
5656
current module file.

doc/api/http.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ aborted, in milliseconds since 1 January 1970 00:00:00 UTC.
463463
added: v0.1.90
464464
-->
465465

466-
* `data` {string | Buffer}
466+
* `data` {string|Buffer}
467467
* `encoding` {string}
468468
* `callback` {Function}
469469

@@ -531,7 +531,7 @@ Returns `request`.
531531
added: v0.1.29
532532
-->
533533

534-
* `chunk` {string | Buffer}
534+
* `chunk` {string|Buffer}
535535
* `encoding` {string}
536536
* `callback` {Function}
537537

@@ -895,7 +895,7 @@ will result in a [`TypeError`][] being thrown.
895895
added: v0.1.90
896896
-->
897897

898-
* `data` {string | Buffer}
898+
* `data` {string|Buffer}
899899
* `encoding` {string}
900900
* `callback` {Function}
901901

@@ -1080,7 +1080,7 @@ status message which was sent out.
10801080
added: v0.1.29
10811081
-->
10821082

1083-
* `chunk` {string | Buffer}
1083+
* `chunk` {string|Buffer}
10841084
* `encoding` {string}
10851085
* `callback` {Function}
10861086
* Returns: {Boolean}

doc/api/modules.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ function require(/* ... */) {
586586
added: v0.1.16
587587
-->
588588
589-
* {String}
589+
* {string}
590590
591591
The fully resolved filename to the module.
592592
@@ -595,7 +595,7 @@ The fully resolved filename to the module.
595595
added: v0.1.16
596596
-->
597597
598-
* {String}
598+
* {string}
599599
600600
The identifier for the module. Typically this is the fully resolved
601601
filename.
@@ -605,7 +605,7 @@ filename.
605605
added: v0.1.16
606606
-->
607607
608-
* {Boolean}
608+
* {boolean}
609609
610610
Whether or not the module is done loading, or is in the process of
611611
loading.

0 commit comments

Comments
 (0)