Skip to content

Commit 9ddbe45

Browse files
Semigradskyrichardlau
authored andcommitted
doc: updates for better json generating
PR-URL: #51592 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Filip Skokan <[email protected]>
1 parent 140cf26 commit 9ddbe45

File tree

16 files changed

+56
-59
lines changed

16 files changed

+56
-59
lines changed

‎doc/api/assert.md‎

Lines changed: 6 additions & 6 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,8 +380,8 @@ added:
380380
- v12.19.0
381381
-->
382382

383-
* Returns:{Array} of objects containing information about the wrapper functions
384-
returned by [`tracker.calls()`][].
383+
* Returns:{Array} An array of objects containing information about the wrapper
384+
functions returned by [`tracker.calls()`][].
385385
* Object{Object}
386386
*`message`{string}
387387
*`actual`{number} The actual number of times the function was called.
@@ -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
importassertfrom'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} The same `Cipher` instance 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} The same `Cipher` instance 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} The same 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} The same 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} The same 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
@@ -1809,7 +1809,7 @@ added: v20.5.0
18091809
18101810
*`signal`{AbortSignal}
18111811
*`listener`{Function|EventListener}
1812-
* Returns:{Disposable} that removes the `abort` listener.
1812+
* Returns:{Disposable} A Disposable that removes the `abort` listener.
18131813

18141814
Listens once to the `abort` event on the provided `signal`.
18151815

‎doc/api/fs.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3442,7 +3442,7 @@ added: v19.8.0
34423442
* `path`{string|Buffer|URL}
34433443
* `options`{Object}
34443444
* `type`{string} An optional mime type for the blob.
3445-
* Return:{Promise} containing {Blob}
3445+
* Returns:{Promise} Fulfills with a {Blob} upon success.
34463446
34473447
Returns a{Blob} whose data is backed by the given file.
34483448
@@ -6410,7 +6410,7 @@ The read-only path of this directory as was provided to [`fs.opendir()`][],
64106410
added: v12.12.0
64116411
-->
64126412
6413-
* Returns:{Promise} containing{fs.Dirent|null}
6413+
* Returns:{Promise} Fulfills with a{fs.Dirent|null}
64146414
64156415
Asynchronously read the next directory entry via readdir(3) as an
64166416
{fs.Dirent}.
@@ -6468,7 +6468,7 @@ included in the iteration results.
64686468
added: v12.12.0
64696469
-->
64706470
6471-
* Returns:{AsyncIterator} of{fs.Dirent}
6471+
* Returns:{AsyncIterator} An AsyncIterator of{fs.Dirent}
64726472
64736473
Asynchronously iterates over the directory until all entries have
64746474
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
@@ -1082,16 +1082,16 @@ columnNumber)`
10821082
10831083
* `lineNumber`{number} The 1-indexed line number of the call
10841084
site in the generated source
1085-
* `columnOffset`{number} The 1-indexed column number
1085+
* `columnNumber`{number} The 1-indexed column number
10861086
of the call site in the generated source
10871087
* Returns:{Object}
10881088
1089-
Given a 1-indexed lineNumber and columnNumber from a call site in
1089+
Given a 1-indexed `lineNumber` and `columnNumber` from a call site in
10901090
the generated source, find the corresponding call site location
10911091
in the original source.
10921092
1093-
If the lineNumber and columnNumber provided are not found in any
1094-
source map, then an empty object is returned. Otherwise, the
1093+
If the `lineNumber` and `columnNumber` provided are not found in any
1094+
source map, then an empty object is returned. Otherwise, the
10951095
returned object contains the following keys:
10961096
10971097
* 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: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,10 +2676,8 @@ changes:
26762676
finished before the call to `finished(stream, cb)`.
26772677
-->
26782678

2679-
*`stream`{Stream|ReadableStream|WritableStream}
2680-
2681-
A readable and/or writable stream/webstream.
2682-
2679+
*`stream`{Stream|ReadableStream|WritableStream} A readable and/or writable
2680+
stream/webstream.
26832681
*`options`{Object}
26842682
*`error`{boolean} If set to `false`, then a call to `emit('error', err)` is
26852683
not treated as finished. **Default:**`true`.
@@ -2695,10 +2693,8 @@ A readable and/or writable stream/webstream.
26952693
listeners added by this function will also be removed.
26962694
*`cleanup`{boolean} remove all registered stream listeners.
26972695
**Default:**`false`.
2698-
26992696
*`callback`{Function} A callback function that takes an optional error
27002697
argument.
2701-
27022698
* Returns:{Function} A cleanup function which removes all registered
27032699
listeners.
27042700

@@ -3303,9 +3299,8 @@ changes:
33033299
-->
33043300

33053301
*`signal`{AbortSignal} A signal representing possible cancellation
3306-
*`stream`{Stream|ReadableStream|WritableStream}
3307-
3308-
A stream to attach a signal to.
3302+
*`stream`{Stream|ReadableStream|WritableStream} A stream to attach a signal
3303+
to.
33093304

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

0 commit comments

Comments
(0)