Skip to content

Commit 9705445

Browse files
tniessentargos
authored andcommitted
doc: use serial comma in fs docs
Refs: #11321 Refs: #17384 PR-URL: #43104 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent da5f364 commit 9705445

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

doc/api/fs.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ changes:
184184
- v15.14.0
185185
- v14.18.0
186186
pr-url: https://github.com/nodejs/node/pull/37490
187-
description: The `data` argument supports `AsyncIterable`, `Iterable` and `Stream`.
187+
description: The `data` argument supports `AsyncIterable`, `Iterable`, and `Stream`.
188188
- version: v14.0.0
189189
pr-url: https://github.com/nodejs/node/pull/31030
190190
description: The `data` parameter won't coerce unsupported input to
@@ -641,7 +641,7 @@ added: v10.0.0
641641
changes:
642642
- version: v15.14.0
643643
pr-url: https://github.com/nodejs/node/pull/37490
644-
description: The `data` argument supports `AsyncIterable`, `Iterable` and `Stream`.
644+
description: The `data` argument supports `AsyncIterable`, `Iterable`, and `Stream`.
645645
- version: v14.0.0
646646
pr-url: https://github.com/nodejs/node/pull/31030
647647
description: The `data` parameter won't coerce unsupported input to
@@ -655,7 +655,7 @@ changes:
655655
* Returns: {Promise}
656656
657657
Asynchronously writes data to a file, replacing the file if it already exists.
658-
`data` can be a string, a buffer, an {AsyncIterable} or {Iterable} object.
658+
`data` can be a string, a buffer, an {AsyncIterable}, or an {Iterable} object.
659659
The promise is resolved with no arguments upon success.
660660
661661
If `options` is a string, then it specifies the `encoding`.
@@ -1447,7 +1447,7 @@ The `atime` and `mtime` arguments follow these rules:
14471447
14481448
* Values can be either numbers representing Unix epoch time, `Date`s, or a
14491449
numeric string like `'123456789.0'`.
1450-
* If the value can not be converted to a number, or is `NaN`, `Infinity` or
1450+
* If the value can not be converted to a number, or is `NaN`, `Infinity`, or
14511451
`-Infinity`, an `Error` will be thrown.
14521452
14531453
### `fsPromises.watch(filename[, options])`
@@ -1507,7 +1507,7 @@ added: v10.0.0
15071507
changes:
15081508
- version: v15.14.0
15091509
pr-url: https://github.com/nodejs/node/pull/37490
1510-
description: The `data` argument supports `AsyncIterable`, `Iterable` and `Stream`.
1510+
description: The `data` argument supports `AsyncIterable`, `Iterable`, and `Stream`.
15111511
- version:
15121512
- v15.2.0
15131513
- v14.17.0
@@ -1530,7 +1530,7 @@ changes:
15301530
* Returns: {Promise} Fulfills with `undefined` upon success.
15311531
15321532
Asynchronously writes data to a file, replacing the file if it already exists.
1533-
`data` can be a string, a buffer, an {AsyncIterable} or {Iterable} object.
1533+
`data` can be a string, a buffer, an {AsyncIterable}, or an {Iterable} object.
15341534
15351535
The `encoding` option is ignored if `data` is a buffer.
15361536
@@ -1650,7 +1650,7 @@ access(file, constants.R_OK | constants.W_OK, (err) => {
16501650
```
16511651
16521652
Do not use `fs.access()` to check for the accessibility of a file before calling
1653-
`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing
1653+
`fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
16541654
so introduces a race condition, since other processes may change the file's
16551655
state between the two calls. Instead, user code should open/read/write the
16561656
file directly and handle the error raised if the file is not accessible.
@@ -1927,17 +1927,17 @@ specifies the permissions for others.
19271927
19281928
For example, the octal value `0o765` means:
19291929
1930-
* The owner may read, write and execute the file.
1930+
* The owner may read, write, and execute the file.
19311931
* The group may read and write the file.
19321932
* Others may read and execute the file.
19331933
19341934
When using raw numbers where file modes are expected, any value larger than
19351935
`0o777` may result in platform-specific behaviors that are not supported to work
1936-
consistently. Therefore constants like `S_ISVTX`, `S_ISGID` or `S_ISUID` are not
1937-
exposed in `fs.constants`.
1936+
consistently. Therefore constants like `S_ISVTX`, `S_ISGID`, or `S_ISUID` are
1937+
not exposed in `fs.constants`.
19381938
19391939
Caveats: on Windows only the write permission can be changed, and the
1940-
distinction among the permissions of group, owner or others is not
1940+
distinction among the permissions of group, owner, or others is not
19411941
implemented.
19421942
19431943
### `fs.chown(path, uid, gid, callback)`
@@ -2286,7 +2286,7 @@ By default, the stream will emit a `'close'` event after it has been
22862286
destroyed. Set the `emitClose` option to `false` to change this behavior.
22872287
22882288
By providing the `fs` option it is possible to override the corresponding `fs`
2289-
implementations for `open`, `write`, `writev` and `close`. Overriding `write()`
2289+
implementations for `open`, `write`, `writev`, and `close`. Overriding `write()`
22902290
without `writev()` can reduce performance as some optimizations (`_writev()`)
22912291
will be disabled. When providing the `fs` option, overrides for at least one of
22922292
`write` and `writev` are required. If no `fd` option is supplied, an override
@@ -2336,7 +2336,7 @@ has only one boolean parameter. This is one reason `fs.access()` is recommended
23362336
instead of `fs.exists()`.
23372337
23382338
Using `fs.exists()` to check for the existence of a file before calling
2339-
`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing
2339+
`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
23402340
so introduces a race condition, since other processes may change the file's
23412341
state between the two calls. Instead, user code should open/read/write the
23422342
file directly and handle the error raised if the file does not exist.
@@ -2651,7 +2651,7 @@ changes:
26512651
it will emit a deprecation warning with id DEP0013.
26522652
- version: v4.1.0
26532653
pr-url: https://github.com/nodejs/node/pull/2387
2654-
description: Numeric strings, `NaN` and `Infinity` are now allowed
2654+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
26552655
time specifiers.
26562656
-->
26572657
@@ -3097,7 +3097,7 @@ changes:
30973097
- v12.17.0
30983098
pr-url: https://github.com/nodejs/node/pull/31402
30993099
description: Options object can be passed in
3100-
to make Buffer, offset, length and position optional.
3100+
to make buffer, offset, length, and position optional.
31013101
-->
31023102
31033103
* `fd` {integer}
@@ -3424,7 +3424,7 @@ changes:
34243424
* `err` {Error}
34253425
* `resolvedPath` {string|Buffer}
34263426

3427-
Asynchronously computes the canonical pathname by resolving `.`, `..` and
3427+
Asynchronously computes the canonical pathname by resolving `.`, `..`, and
34283428
symbolic links.
34293429

34303430
A canonical pathname is not necessarily unique. Hard links and bind mounts can
@@ -3663,7 +3663,7 @@ Asynchronous stat(2). The callback gets two arguments `(err, stats)` where
36633663
In case of an error, the `err.code` will be one of [Common System Errors][].
36643664

36653665
Using `fs.stat()` to check for the existence of a file before calling
3666-
`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended.
3666+
`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
36673667
Instead, user code should open/read/write the file directly and handle the
36683668
error raised if the file is not available.
36693669

@@ -3927,7 +3927,7 @@ changes:
39273927
it will emit a deprecation warning with id DEP0013.
39283928
- version: v4.1.0
39293929
pr-url: https://github.com/nodejs/node/pull/2387
3930-
description: Numeric strings, `NaN` and `Infinity` are now allowed
3930+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
39313931
time specifiers.
39323932
-->
39333933
@@ -3943,7 +3943,7 @@ The `atime` and `mtime` arguments follow these rules:
39433943
39443944
* Values can be either numbers representing Unix epoch time in seconds,
39453945
`Date`s, or a numeric string like `'123456789.0'`.
3946-
* If the value can not be converted to a number, or is `NaN`, `Infinity` or
3946+
* If the value can not be converted to a number, or is `NaN`, `Infinity`, or
39473947
`-Infinity`, an `Error` will be thrown.
39483948
39493949
### `fs.watch(filename[, options][, listener])`
@@ -4812,7 +4812,7 @@ added: v0.4.2
48124812
changes:
48134813
- version: v4.1.0
48144814
pr-url: https://github.com/nodejs/node/pull/2387
4815-
description: Numeric strings, `NaN` and `Infinity` are now allowed
4815+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
48164816
time specifiers.
48174817
-->
48184818
@@ -5172,7 +5172,7 @@ changes:
51725172
- v12.17.0
51735173
pr-url: https://github.com/nodejs/node/pull/32460
51745174
description: Options object can be passed in
5175-
to make offset, length and position optional.
5175+
to make offset, length, and position optional.
51765176
-->
51775177
51785178
* `fd` {integer}
@@ -5475,7 +5475,7 @@ changes:
54755475
protocol.
54765476
- version: v4.1.0
54775477
pr-url: https://github.com/nodejs/node/pull/2387
5478-
description: Numeric strings, `NaN` and `Infinity` are now allowed
5478+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
54795479
time specifiers.
54805480
-->
54815481
@@ -6095,7 +6095,7 @@ changes:
60956095
60966096
A {fs.Stats} object provides information about a file.
60976097
6098-
Objects returned from [`fs.stat()`][], [`fs.lstat()`][] and [`fs.fstat()`][] and
6098+
Objects returned from [`fs.stat()`][], [`fs.lstat()`][], [`fs.fstat()`][], and
60996099
their synchronous counterparts are of this type.
61006100
If `bigint` in the `options` passed to those methods is true, the numeric values
61016101
will be `bigint` instead of `number`, and the object will contain additional
@@ -6742,7 +6742,7 @@ The following constants are meant for use with `fs.open()`.
67426742
</table>
67436743
67446744
On Windows, only `O_APPEND`, `O_CREAT`, `O_EXCL`, `O_RDONLY`, `O_RDWR`,
6745-
`O_TRUNC`, `O_WRONLY` and `UV_FS_O_FILEMAP` are available.
6745+
`O_TRUNC`, `O_WRONLY`, and `UV_FS_O_FILEMAP` are available.
67466746
67476747
##### File type constants
67486748
@@ -7253,7 +7253,7 @@ fs.open('<directory>', 'a+', (err, fd) => {
72537253
```
72547254
72557255
On Windows, opening an existing hidden file using the `'w'` flag (either
7256-
through `fs.open()` or `fs.writeFile()` or `fsPromises.open()`) will fail with
7256+
through `fs.open()`, `fs.writeFile()`, or `fsPromises.open()`) will fail with
72577257
`EPERM`. Existing hidden files can be opened for writing with the `'r+'` flag.
72587258
72597259
A call to `fs.ftruncate()` or `filehandle.truncate()` can be used to reset

0 commit comments

Comments
 (0)