Skip to content

Commit abf1155

Browse files
vsemozhetbytMylesBorins
authored andcommitted
doc: add missing periods or colons
Some other formatting nits were fixed and some superfluous descriptions were simplified in passing. PR-URL: #20401 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 261776d commit abf1155

26 files changed

+97
-100
lines changed

doc/api/buffer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2458,7 +2458,7 @@ added: v3.0.0
24582458

24592459
* {integer} The largest size allowed for a single `Buffer` instance.
24602460

2461-
An alias for [`buffer.constants.MAX_LENGTH`][]
2461+
An alias for [`buffer.constants.MAX_LENGTH`][].
24622462

24632463
Note that this is a property on the `buffer` module returned by
24642464
`require('buffer')`, not on the `Buffer` global or a `Buffer` instance.

doc/api/child_process.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ child registers an event handler for the [`'disconnect'`][] event
652652
or the [`'message'`][] event. This allows the child to exit
653653
normally without the process being held open by the open IPC channel.*
654654

655-
See also: [`child_process.exec()`][] and [`child_process.fork()`][]
655+
See also: [`child_process.exec()`][] and [`child_process.fork()`][].
656656

657657
## Synchronous Process Creation
658658

@@ -776,7 +776,7 @@ process has exited.*
776776

777777
If the process times out or has a non-zero exit code, this method ***will***
778778
throw. The [`Error`][] object will contain the entire result from
779-
[`child_process.spawnSync()`][]
779+
[`child_process.spawnSync()`][].
780780

781781
**Never pass unsanitized user input to this function. Any input containing shell
782782
metacharacters may be used to trigger arbitrary command execution.**
@@ -1056,7 +1056,7 @@ does not indicate that the child process has been terminated.
10561056
added: v0.1.90
10571057
-->
10581058

1059-
* {number} Integer
1059+
* {integer}
10601060

10611061
Returns the process identifier (PID) of the child process.
10621062

doc/api/cli.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ added: v6.0.0
5858
-->
5959

6060
Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with
61-
`./configure --openssl-fips`)
61+
`./configure --openssl-fips`.)
6262

6363
### `--experimental-modules`
6464
<!-- YAML
@@ -87,14 +87,14 @@ added: v6.0.0
8787
-->
8888

8989
Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)
90-
(Same requirements as `--enable-fips`)
90+
(Same requirements as `--enable-fips`.)
9191

9292
### `--icu-data-dir=file`
9393
<!-- YAML
9494
added: v0.11.15
9595
-->
9696

97-
Specify ICU data load path. (overrides `NODE_ICU_DATA`)
97+
Specify ICU data load path. (Overrides `NODE_ICU_DATA`.)
9898

9999
### `--inspect-brk[=[host:]port]`
100100
<!-- YAML
@@ -246,8 +246,8 @@ Throw errors for deprecations.
246246
added: v4.0.0
247247
-->
248248

249-
Specify an alternative default TLS cipher list. (Requires Node.js to be built
250-
with crypto support. (Default))
249+
Specify an alternative default TLS cipher list. Requires Node.js to be built
250+
with crypto support (default).
251251

252252
### `--trace-deprecation`
253253
<!-- YAML

doc/api/cluster.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Each new worker is given its own unique id, this id is stored in the
363363
`id`.
364364

365365
While a worker is alive, this is the key that indexes it in
366-
cluster.workers
366+
`cluster.workers`.
367367

368368
### worker.isConnected()
369369
<!-- YAML
@@ -412,7 +412,7 @@ All workers are created using [`child_process.fork()`][], the returned object
412412
from this function is stored as `.process`. In a worker, the global `process`
413413
is stored.
414414

415-
See: [Child Process module][]
415+
See: [Child Process module][].
416416

417417
Note that workers will call `process.exit(0)` if the `'disconnect'` event occurs
418418
on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
@@ -748,7 +748,7 @@ changes:
748748
description: The `stdio` option is supported now.
749749
-->
750750

751-
* `settings` {Object} see [`cluster.settings`][]
751+
* `settings` {Object} See [`cluster.settings`][].
752752

753753
`setupMaster` is used to change the default 'fork' behavior. Once called,
754754
the settings will be present in `cluster.settings`.

doc/api/console.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ changes:
9999
Setting to `true` enables coloring while inspecting values, setting to
100100
`'auto'` will make color support depend on the value of the `isTTY` property
101101
and the value returned by `getColorDepth()` on the respective stream.
102-
**Default:** `'auto'`
102+
**Default:** `'auto'`.
103103

104104
Creates a new `Console` with one or two writable stream instances. `stdout` is a
105105
writable stream to print log or info output. `stderr` is used for warning or

doc/api/deprecations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ explicitly via error event handlers set on the domain instead.
170170
Type: End-of-Life
171171

172172
Calling an asynchronous function without a callback throws a `TypeError`
173-
v10.0.0 onwards. Refer: [PR 12562](https://github.com/nodejs/node/pull/12562)
173+
v10.0.0 onwards. Refer: [PR 12562](https://github.com/nodejs/node/pull/12562).
174174

175175
<a id="DEP0014"></a>
176176
### DEP0014: fs.read legacy String interface

doc/api/dgram.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ properties.
111111
added: v0.1.99
112112
-->
113113

114-
* `port` {number} Integer.
114+
* `port` {integer}
115115
* `address` {string}
116116
* `callback` {Function} with no parameters. Called when binding is complete.
117117

@@ -279,9 +279,9 @@ changes:
279279
-->
280280

281281
* `msg` {Buffer|Uint8Array|string|Array} Message to be sent.
282-
* `offset` {number} Integer. Offset in the buffer where the message starts.
283-
* `length` {number} Integer. Number of bytes in the message.
284-
* `port` {number} Integer. Destination port.
282+
* `offset` {integer} Offset in the buffer where the message starts.
283+
* `length` {integer} Number of bytes in the message.
284+
* `port` {integer} Destination port.
285285
* `address` {string} Destination hostname or IP address.
286286
* `callback` {Function} Called when the message has been sent.
287287

@@ -479,7 +479,7 @@ multicast packets will also be received on the local interface.
479479
added: v0.3.8
480480
-->
481481

482-
* `ttl` {number} Integer.
482+
* `ttl` {integer}
483483

484484
Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
485485
"Time to Live", in this context it specifies the number of IP hops that a
@@ -495,7 +495,7 @@ between 0 and 255. The default on most systems is `1` but can vary.
495495
added: v8.7.0
496496
-->
497497

498-
* `size` {number} Integer
498+
* `size` {integer}
499499

500500
Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
501501
in bytes.
@@ -505,7 +505,7 @@ in bytes.
505505
added: v8.7.0
506506
-->
507507

508-
* `size` {number} Integer
508+
* `size` {integer}
509509

510510
Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
511511
in bytes.
@@ -515,7 +515,7 @@ in bytes.
515515
added: v0.1.101
516516
-->
517517

518-
* `ttl` {number} Integer.
518+
* `ttl` {integer}
519519

520520
Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
521521
in this context it specifies the number of IP hops that a packet is allowed to

doc/api/errors.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ entry types were found.
16561656
<a id="ERR_VALUE_OUT_OF_RANGE"></a>
16571657
### ERR_VALUE_OUT_OF_RANGE
16581658

1659-
Superseded by `ERR_OUT_OF_RANGE`
1659+
Superseded by `ERR_OUT_OF_RANGE`.
16601660

16611661
<a id="ERR_VM_MODULE_ALREADY_LINKED"></a>
16621662
### ERR_VM_MODULE_ALREADY_LINKED

doc/api/fs.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ added: v0.1.10
500500

501501
Returns `true` if the `fs.Stats` object describes a symbolic link.
502502

503-
This method is only valid when using [`fs.lstat()`][]
503+
This method is only valid when using [`fs.lstat()`][].
504504

505505
### stats.dev
506506

@@ -1038,7 +1038,7 @@ changes:
10381038
Asynchronously changes the permissions of a file. No arguments other than a
10391039
possible exception are given to the completion callback.
10401040

1041-
See also: chmod(2)
1041+
See also: chmod(2).
10421042

10431043
### File modes
10441044

@@ -1097,7 +1097,7 @@ changes:
10971097
Synchronously changes the permissions of a file. Returns `undefined`.
10981098
This is the synchronous version of [`fs.chmod()`][].
10991099

1100-
See also: chmod(2)
1100+
See also: chmod(2).
11011101

11021102
## fs.chown(path, uid, gid, callback)
11031103
<!-- YAML
@@ -1126,7 +1126,7 @@ changes:
11261126
Asynchronously changes owner and group of a file. No arguments other than a
11271127
possible exception are given to the completion callback.
11281128

1129-
See also: chown(2)
1129+
See also: chown(2).
11301130

11311131
## fs.chownSync(path, uid, gid)
11321132
<!-- YAML
@@ -1145,7 +1145,7 @@ changes:
11451145
Synchronously changes owner and group of a file. Returns `undefined`.
11461146
This is the synchronous version of [`fs.chown()`][].
11471147

1148-
See also: chown(2)
1148+
See also: chown(2).
11491149

11501150
## fs.close(fd, callback)
11511151
<!-- YAML
@@ -1711,7 +1711,8 @@ given to the completion callback.
17111711
If the file referred to by the file descriptor was larger than `len` bytes, only
17121712
the first `len` bytes will be retained in the file.
17131713

1714-
For example, the following program retains only the first four bytes of the file
1714+
For example, the following program retains only the first four bytes of the
1715+
file:
17151716

17161717
```js
17171718
console.log(fs.readFileSync('temp.txt', 'utf8'));
@@ -1985,7 +1986,7 @@ changes:
19851986
Asynchronously creates a directory. No arguments other than a possible exception
19861987
are given to the completion callback.
19871988

1988-
See also: mkdir(2)
1989+
See also: mkdir(2).
19891990

19901991
## fs.mkdirSync(path[, mode])
19911992
<!-- YAML
@@ -2003,7 +2004,7 @@ changes:
20032004
Synchronously creates a directory. Returns `undefined`.
20042005
This is the synchronous version of [`fs.mkdir()`][].
20052006

2006-
See also: mkdir(2)
2007+
See also: mkdir(2).
20072008

20082009
## fs.mkdtemp(prefix[, options], callback)
20092010
<!-- YAML
@@ -2868,7 +2869,7 @@ fs.unlink('path/file.txt', (err) => {
28682869
`fs.unlink()` will not work on a directory, empty or otherwise. To remove a
28692870
directory, use [`fs.rmdir()`][].
28702871

2871-
See also: unlink(2)
2872+
See also: unlink(2).
28722873

28732874
## fs.unlinkSync(path)
28742875
<!-- YAML

doc/api/http.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ added: v0.7.8
459459
Emitted when the underlying socket times out from inactivity. This only notifies
460460
that the socket has been idle. The request must be aborted manually.
461461

462-
See also: [`request.setTimeout()`][]
462+
See also: [`request.setTimeout()`][].
463463

464464
### Event: 'upgrade'
465465
<!-- YAML
@@ -541,7 +541,7 @@ added: v0.3.0
541541

542542
* {net.Socket}
543543

544-
See [`request.socket`][]
544+
See [`request.socket`][].
545545

546546
### request.end([data[, encoding]][, callback])
547547
<!-- YAML
@@ -1798,7 +1798,7 @@ automatically. Note that the callback must take care to consume the response
17981798
data for reasons stated in [`http.ClientRequest`][] section.
17991799

18001800
The `callback` is invoked with a single argument that is an instance of
1801-
[`http.IncomingMessage`][]
1801+
[`http.IncomingMessage`][].
18021802

18031803
JSON Fetching Example:
18041804

doc/api/http2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ protocol is available on the host `'example.org'` on TCP/IP port 81. The
642642
host and port *must* be contained within the quote (`"`) characters.
643643

644644
Multiple alternatives may be specified, for instance: `'h2="example.org:81",
645-
h2=":82"'`
645+
h2=":82"'`.
646646

647647
The protocol identifier (`'h2'` in the examples) may be any valid
648648
[ALPN Protocol ID][].

doc/api/https.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Makes a request to a secure web server.
170170
The following additional `options` from [`tls.connect()`][] are also accepted:
171171
`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,
172172
`honorCipherOrder`, `key`, `passphrase`, `pfx`, `rejectUnauthorized`,
173-
`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`
173+
`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`.
174174

175175
`options` can be an object, a string, or a [`URL`][] object. If `options` is a
176176
string, it is automatically parsed with [`url.parse()`][]. If it is a [`URL`][]

doc/api/modules.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ this, assign the desired export object to `module.exports`. Note that assigning
706706
the desired object to `exports` will simply rebind the local `exports` variable,
707707
which is probably not what is desired.
708708

709-
For example suppose we were making a module called `a.js`
709+
For example suppose we were making a module called `a.js`:
710710

711711
```js
712712
const EventEmitter = require('events');
@@ -720,7 +720,7 @@ setTimeout(() => {
720720
}, 1000);
721721
```
722722

723-
Then in another file we could do
723+
Then in another file we could do:
724724

725725
```js
726726
const a = require('./a');

doc/api/n-api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,7 @@ napi_status napi_set_named_property(napi_env env,
26352635
Returns `napi_ok` if the API succeeded.
26362636

26372637
This method is equivalent to calling [`napi_set_property`][] with a `napi_value`
2638-
created from the string passed in as `utf8Name`
2638+
created from the string passed in as `utf8Name`.
26392639

26402640
#### napi_get_named_property
26412641
<!-- YAML
@@ -2656,7 +2656,7 @@ napi_status napi_get_named_property(napi_env env,
26562656
Returns `napi_ok` if the API succeeded.
26572657

26582658
This method is equivalent to calling [`napi_get_property`][] with a `napi_value`
2659-
created from the string passed in as `utf8Name`
2659+
created from the string passed in as `utf8Name`.
26602660

26612661
#### napi_has_named_property
26622662
<!-- YAML
@@ -2677,7 +2677,7 @@ napi_status napi_has_named_property(napi_env env,
26772677
Returns `napi_ok` if the API succeeded.
26782678

26792679
This method is equivalent to calling [`napi_has_property`][] with a `napi_value`
2680-
created from the string passed in as `utf8Name`
2680+
created from the string passed in as `utf8Name`.
26812681

26822682
#### napi_set_element
26832683
<!-- YAML

0 commit comments

Comments
 (0)