Skip to content

Commit 8566f41

Browse files
committed
doc: updates for better json generating
1 parent 64c6d97 commit 8566f41

File tree

16 files changed

+53
-58
lines changed

16 files changed

+53
-58
lines changed

doc/api/assert.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ added:
296296

297297
* `fn` {Function} **Default:** A no-op function.
298298
* `exact` {number} **Default:** `1`.
299-
* Returns: {Function} that wraps `fn`.
299+
* Returns: {Function} A function that wraps `fn`.
300300

301301
The wrapper function is expected to be called exactly `exact` times. If the
302302
function has not been called exactly `exact` times when
@@ -337,9 +337,9 @@ added:
337337
- v16.18.0
338338
-->
339339

340-
* `fn` {Function}.
340+
* `fn` {Function}
341341

342-
* Returns: {Array} with all the calls to a tracked function.
342+
* Returns: {Array} An array with all the calls to a tracked function.
343343

344344
* Object {Object}
345345
* `thisArg` {Object}
@@ -380,7 +380,7 @@ added:
380380
- v12.19.0
381381
-->
382382

383-
* Returns: {Array} of objects containing information about the wrapper functions
383+
* Returns: {Array} An array of objects containing information about the wrapper functions
384384
returned by [`tracker.calls()`][].
385385
* Object {Object}
386386
* `message` {string}
@@ -457,7 +457,7 @@ added:
457457

458458
Reset calls of the call tracker.
459459
If a tracked function is passed as an argument, the calls will be reset for it.
460-
If no arguments are passed, all tracked functions will be reset
460+
If no arguments are passed, all tracked functions will be reset.
461461

462462
```mjs
463463
import assert from 'node:assert';

doc/api/crypto.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ added: v1.0.0
570570
* `options` {Object} [`stream.transform` options][]
571571
* `plaintextLength` {number}
572572
* `encoding` {string} The string encoding to use when `buffer` is a string.
573-
* Returns: {Cipher} for method chaining.
573+
* Returns: {Cipher} A Cipher for method chaining.
574574

575575
When using an authenticated encryption mode (`GCM`, `CCM`, `OCB`, and
576576
`chacha20-poly1305` are
@@ -590,7 +590,7 @@ added: v0.7.1
590590
-->
591591

592592
* `autoPadding` {boolean} **Default:** `true`
593-
* Returns: {Cipher} for method chaining.
593+
* Returns: {Cipher} A Cipher for method chaining.
594594

595595
When using block encryption algorithms, the `Cipher` class will automatically
596596
add padding to the input data to the appropriate block size. To disable the
@@ -870,7 +870,7 @@ changes:
870870
* `options` {Object} [`stream.transform` options][]
871871
* `plaintextLength` {number}
872872
* `encoding` {string} String encoding to use when `buffer` is a string.
873-
* Returns: {Decipher} for method chaining.
873+
* Returns: {Decipher} A Decipher for method chaining.
874874

875875
When using an authenticated encryption mode (`GCM`, `CCM`, `OCB`, and
876876
`chacha20-poly1305` are
@@ -905,7 +905,7 @@ changes:
905905

906906
* `buffer` {string|Buffer|ArrayBuffer|TypedArray|DataView}
907907
* `encoding` {string} String encoding to use when `buffer` is a string.
908-
* Returns: {Decipher} for method chaining.
908+
* Returns: {Decipher} A Decipher for method chaining.
909909

910910
When using an authenticated encryption mode (`GCM`, `CCM`, `OCB`, and
911911
`chacha20-poly1305` are
@@ -931,7 +931,7 @@ added: v0.7.1
931931
-->
932932

933933
* `autoPadding` {boolean} **Default:** `true`
934-
* Returns: {Decipher} for method chaining.
934+
* Returns: {Decipher} A Decipher for method chaining.
935935

936936
When data has been encrypted without standard block padding, calling
937937
`decipher.setAutoPadding(false)` will disable automatic padding to prevent

doc/api/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ added:
18151815
18161816
* `signal` {AbortSignal}
18171817
* `listener` {Function|EventListener}
1818-
* Returns: {Disposable} that removes the `abort` listener.
1818+
* Returns: {Disposable} A Disposable that removes the `abort` listener.
18191819

18201820
Listens once to the `abort` event on the provided `signal`.
18211821

doc/api/fs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3484,7 +3484,7 @@ added: v19.8.0
34843484
* `path` {string|Buffer|URL}
34853485
* `options` {Object}
34863486
* `type` {string} An optional mime type for the blob.
3487-
* Return: {Promise} containing {Blob}
3487+
* Returns: {Promise} Fulfills with a {Blob} upon success.
34883488
34893489
Returns a {Blob} whose data is backed by the given file.
34903490
@@ -6470,7 +6470,7 @@ The read-only path of this directory as was provided to [`fs.opendir()`][],
64706470
added: v12.12.0
64716471
-->
64726472
6473-
* Returns: {Promise} containing {fs.Dirent|null}
6473+
* Returns: {Promise} Fulfills with a {fs.Dirent|null}
64746474
64756475
Asynchronously read the next directory entry via readdir(3) as an
64766476
{fs.Dirent}.
@@ -6528,7 +6528,7 @@ included in the iteration results.
65286528
added: v12.12.0
65296529
-->
65306530
6531-
* Returns: {AsyncIterator} of {fs.Dirent}
6531+
* Returns: {AsyncIterator} An AsyncIterator of {fs.Dirent}
65326532
65336533
Asynchronously iterates over the directory until all entries have
65346534
been read. Refer to the POSIX readdir(3) documentation for more detail.

doc/api/http.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,7 +3090,7 @@ added: v0.4.0
30903090
-->
30913091

30923092
* `name` {string} Name of header
3093-
* Returns {string | undefined}
3093+
* Returns: {string | undefined}
30943094

30953095
Gets the value of the HTTP header with the given name. If that header is not
30963096
set, the returned value will be `undefined`.
@@ -3101,7 +3101,7 @@ set, the returned value will be `undefined`.
31013101
added: v7.7.0
31023102
-->
31033103

3104-
* Returns {string\[]}
3104+
* Returns: {string\[]}
31053105

31063106
Returns an array containing the unique names of the current outgoing headers.
31073107
All names are lowercase.
@@ -3140,7 +3140,7 @@ added: v7.7.0
31403140
-->
31413141

31423142
* `name` {string}
3143-
* Returns {boolean}
3143+
* Returns: {boolean}
31443144

31453145
Returns `true` if the header identified by `name` is currently set in the
31463146
outgoing headers. The header name is case-insensitive.
@@ -3360,7 +3360,7 @@ changes:
33603360
* `chunk` {string|Buffer|Uint8Array}
33613361
* `encoding` {string} **Default**: `utf8`
33623362
* `callback` {Function}
3363-
* Returns {boolean}
3363+
* Returns: {boolean}
33643364

33653365
Sends a chunk of the body. This method can be called multiple times.
33663366

doc/api/inspector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ changes:
444444
**Default:** what was specified on the CLI.
445445
* `wait` {boolean} Block until a client has connected. Optional.
446446
**Default:** `false`.
447-
* Returns: {Disposable} that calls [`inspector.close()`][].
447+
* Returns: {Disposable} A Disposable that calls [`inspector.close()`][].
448448

449449
Activate inspector on host and port. Equivalent to
450450
`node --inspect=[[host:]port]`, but can be done programmatically after node has

doc/api/module.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,16 +1020,16 @@ columnNumber)`
10201020
10211021
* `lineNumber` {number} The 1-indexed line number of the call
10221022
site in the generated source
1023-
* `columnOffset` {number} The 1-indexed column number
1023+
* `columnNumber` {number} The 1-indexed column number
10241024
of the call site in the generated source
10251025
* Returns: {Object}
10261026
1027-
Given a 1-indexed lineNumber and columnNumber from a call site in
1027+
Given a 1-indexed `lineNumber` and `columnNumber` from a call site in
10281028
the generated source, find the corresponding call site location
10291029
in the original source.
10301030
1031-
If the lineNumber and columnNumber provided are not found in any
1032-
source map, then an empty object is returned. Otherwise, the
1031+
If the `lineNumber` and `columnNumber` provided are not found in any
1032+
source map, then an empty object is returned. Otherwise, the
10331033
returned object contains the following keys:
10341034
10351035
* name: {string | undefined} The name of the range in the

doc/api/os.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ added:
250250
- v16.18.0
251251
-->
252252

253-
* Returns {string}
253+
* Returns: {string}
254254

255255
Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
256256
`mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
@@ -483,7 +483,7 @@ added:
483483
- v12.17.0
484484
-->
485485

486-
* Returns {string}
486+
* Returns: {string}
487487

488488
Returns a string identifying the kernel version.
489489

doc/api/perf_hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ added:
107107
`eventLoopUtilization()`.
108108
* `utilization2` {Object} The result of a previous call to
109109
`eventLoopUtilization()` prior to `utilization1`.
110-
* Returns {Object}
110+
* Returns: {Object}
111111
* `idle` {number}
112112
* `active` {number}
113113
* `utilization` {number}
@@ -1476,7 +1476,7 @@ added:
14761476
**Default:** `Number.MAX_SAFE_INTEGER`.
14771477
* `figures` {number} The number of accuracy digits. Must be a number between
14781478
`1` and `5`. **Default:** `3`.
1479-
* Returns {RecordableHistogram}
1479+
* Returns: {RecordableHistogram}
14801480

14811481
Returns a {RecordableHistogram}.
14821482

doc/api/stream.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,10 +2651,7 @@ changes:
26512651
finished before the call to `finished(stream, cb)`.
26522652
-->
26532653

2654-
* `stream` {Stream|ReadableStream|WritableStream}
2655-
2656-
A readable and/or writable stream/webstream.
2657-
2654+
* `stream` {Stream|ReadableStream|WritableStream} A readable and/or writable stream/webstream.
26582655
* `options` {Object}
26592656
* `error` {boolean} If set to `false`, then a call to `emit('error', err)` is
26602657
not treated as finished. **Default:** `true`.
@@ -2670,10 +2667,8 @@ A readable and/or writable stream/webstream.
26702667
listeners added by this function will also be removed.
26712668
* `cleanup` {boolean} remove all registered stream listeners.
26722669
**Default:** `false`.
2673-
26742670
* `callback` {Function} A callback function that takes an optional error
26752671
argument.
2676-
26772672
* Returns: {Function} A cleanup function which removes all registered
26782673
listeners.
26792674

@@ -3286,9 +3281,7 @@ changes:
32863281
-->
32873282

32883283
* `signal` {AbortSignal} A signal representing possible cancellation
3289-
* `stream` {Stream|ReadableStream|WritableStream}
3290-
3291-
A stream to attach a signal to.
3284+
* `stream` {Stream|ReadableStream|WritableStream} A stream to attach a signal to.
32923285

32933286
Attaches an AbortSignal to a readable or writeable stream. This lets code
32943287
control stream destruction using an `AbortController`.

0 commit comments

Comments
 (0)