Skip to content

Commit d1d30d7

Browse files
authored
doc: use serial comma in fs docs
Refs: nodejs#11321 Refs: nodejs#17384 PR-URL: nodejs#43104 Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 82861e9 commit d1d30d7

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

doc/api/fs.md

+25-25
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
@@ -690,7 +690,7 @@ changes:
690690
- v15.14.0
691691
- v14.18.0
692692
pr-url: https://github.com/nodejs/node/pull/37490
693-
description: The `data` argument supports `AsyncIterable`, `Iterable` and `Stream`.
693+
description: The `data` argument supports `AsyncIterable`, `Iterable`, and `Stream`.
694694
- version: v14.0.0
695695
pr-url: https://github.com/nodejs/node/pull/31030
696696
description: The `data` parameter won't coerce unsupported input to
@@ -704,7 +704,7 @@ changes:
704704
* Returns: {Promise}
705705
706706
Asynchronously writes data to a file, replacing the file if it already exists.
707-
`data` can be a string, a buffer, an {AsyncIterable} or {Iterable} object.
707+
`data` can be a string, a buffer, an {AsyncIterable}, or an {Iterable} object.
708708
The promise is resolved with no arguments upon success.
709709
710710
If `options` is a string, then it specifies the `encoding`.
@@ -1472,7 +1472,7 @@ The `atime` and `mtime` arguments follow these rules:
14721472
14731473
* Values can be either numbers representing Unix epoch time, `Date`s, or a
14741474
numeric string like `'123456789.0'`.
1475-
* If the value can not be converted to a number, or is `NaN`, `Infinity` or
1475+
* If the value can not be converted to a number, or is `NaN`, `Infinity`, or
14761476
`-Infinity`, an `Error` will be thrown.
14771477
14781478
### `fsPromises.watch(filename[, options])`
@@ -1536,7 +1536,7 @@ changes:
15361536
- v15.14.0
15371537
- v14.18.0
15381538
pr-url: https://github.com/nodejs/node/pull/37490
1539-
description: The `data` argument supports `AsyncIterable`, `Iterable` and `Stream`.
1539+
description: The `data` argument supports `AsyncIterable`, `Iterable`, and `Stream`.
15401540
- version:
15411541
- v15.2.0
15421542
- v14.17.0
@@ -1559,7 +1559,7 @@ changes:
15591559
* Returns: {Promise} Fulfills with `undefined` upon success.
15601560
15611561
Asynchronously writes data to a file, replacing the file if it already exists.
1562-
`data` can be a string, a buffer, an {AsyncIterable} or {Iterable} object.
1562+
`data` can be a string, a buffer, an {AsyncIterable}, or an {Iterable} object.
15631563
15641564
The `encoding` option is ignored if `data` is a buffer.
15651565
@@ -1684,7 +1684,7 @@ access(file, constants.R_OK | constants.W_OK, (err) => {
16841684
```
16851685
16861686
Do not use `fs.access()` to check for the accessibility of a file before calling
1687-
`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing
1687+
`fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
16881688
so introduces a race condition, since other processes may change the file's
16891689
state between the two calls. Instead, user code should open/read/write the
16901690
file directly and handle the error raised if the file is not accessible.
@@ -1971,17 +1971,17 @@ specifies the permissions for others.
19711971
19721972
For example, the octal value `0o765` means:
19731973
1974-
* The owner may read, write and execute the file.
1974+
* The owner may read, write, and execute the file.
19751975
* The group may read and write the file.
19761976
* Others may read and execute the file.
19771977
19781978
When using raw numbers where file modes are expected, any value larger than
19791979
`0o777` may result in platform-specific behaviors that are not supported to work
1980-
consistently. Therefore constants like `S_ISVTX`, `S_ISGID` or `S_ISUID` are not
1981-
exposed in `fs.constants`.
1980+
consistently. Therefore constants like `S_ISVTX`, `S_ISGID`, or `S_ISUID` are
1981+
not exposed in `fs.constants`.
19821982
19831983
Caveats: on Windows only the write permission can be changed, and the
1984-
distinction among the permissions of group, owner or others is not
1984+
distinction among the permissions of group, owner, or others is not
19851985
implemented.
19861986
19871987
### `fs.chown(path, uid, gid, callback)`
@@ -2354,7 +2354,7 @@ By default, the stream will emit a `'close'` event after it has been
23542354
destroyed. Set the `emitClose` option to `false` to change this behavior.
23552355
23562356
By providing the `fs` option it is possible to override the corresponding `fs`
2357-
implementations for `open`, `write`, `writev` and `close`. Overriding `write()`
2357+
implementations for `open`, `write`, `writev`, and `close`. Overriding `write()`
23582358
without `writev()` can reduce performance as some optimizations (`_writev()`)
23592359
will be disabled. When providing the `fs` option, overrides for at least one of
23602360
`write` and `writev` are required. If no `fd` option is supplied, an override
@@ -2409,7 +2409,7 @@ has only one boolean parameter. This is one reason `fs.access()` is recommended
24092409
instead of `fs.exists()`.
24102410
24112411
Using `fs.exists()` to check for the existence of a file before calling
2412-
`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing
2412+
`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
24132413
so introduces a race condition, since other processes may change the file's
24142414
state between the two calls. Instead, user code should open/read/write the
24152415
file directly and handle the error raised if the file does not exist.
@@ -2759,7 +2759,7 @@ changes:
27592759
it will emit a deprecation warning with id DEP0013.
27602760
- version: v4.1.0
27612761
pr-url: https://github.com/nodejs/node/pull/2387
2762-
description: Numeric strings, `NaN` and `Infinity` are now allowed
2762+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
27632763
time specifiers.
27642764
-->
27652765
@@ -3256,7 +3256,7 @@ changes:
32563256
- v12.17.0
32573257
pr-url: https://github.com/nodejs/node/pull/31402
32583258
description: Options object can be passed in
3259-
to make Buffer, offset, length and position optional.
3259+
to make buffer, offset, length, and position optional.
32603260
-->
32613261
32623262
* `fd` {integer}
@@ -3611,7 +3611,7 @@ changes:
36113611
* `err` {Error}
36123612
* `resolvedPath` {string|Buffer}
36133613

3614-
Asynchronously computes the canonical pathname by resolving `.`, `..` and
3614+
Asynchronously computes the canonical pathname by resolving `.`, `..`, and
36153615
symbolic links.
36163616

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

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

@@ -4157,7 +4157,7 @@ changes:
41574157
it will emit a deprecation warning with id DEP0013.
41584158
- version: v4.1.0
41594159
pr-url: https://github.com/nodejs/node/pull/2387
4160-
description: Numeric strings, `NaN` and `Infinity` are now allowed
4160+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
41614161
time specifiers.
41624162
-->
41634163

@@ -4173,7 +4173,7 @@ The `atime` and `mtime` arguments follow these rules:
41734173

41744174
* Values can be either numbers representing Unix epoch time in seconds,
41754175
`Date`s, or a numeric string like `'123456789.0'`.
4176-
* If the value can not be converted to a number, or is `NaN`, `Infinity` or
4176+
* If the value can not be converted to a number, or is `NaN`, `Infinity`, or
41774177
`-Infinity`, an `Error` will be thrown.
41784178

41794179
### `fs.watch(filename[, options][, listener])`
@@ -5069,7 +5069,7 @@ added: v0.4.2
50695069
changes:
50705070
- version: v4.1.0
50715071
pr-url: https://github.com/nodejs/node/pull/2387
5072-
description: Numeric strings, `NaN` and `Infinity` are now allowed
5072+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
50735073
time specifiers.
50745074
-->
50755075
@@ -5431,7 +5431,7 @@ changes:
54315431
- v12.17.0
54325432
pr-url: https://github.com/nodejs/node/pull/32460
54335433
description: Options object can be passed in
5434-
to make offset, length and position optional.
5434+
to make offset, length, and position optional.
54355435
-->
54365436
54375437
* `fd` {integer}
@@ -5736,7 +5736,7 @@ changes:
57365736
protocol.
57375737
- version: v4.1.0
57385738
pr-url: https://github.com/nodejs/node/pull/2387
5739-
description: Numeric strings, `NaN` and `Infinity` are now allowed
5739+
description: Numeric strings, `NaN`, and `Infinity` are now allowed
57405740
time specifiers.
57415741
-->
57425742
@@ -6363,7 +6363,7 @@ changes:
63636363
63646364
A {fs.Stats} object provides information about a file.
63656365
6366-
Objects returned from [`fs.stat()`][], [`fs.lstat()`][] and [`fs.fstat()`][] and
6366+
Objects returned from [`fs.stat()`][], [`fs.lstat()`][], [`fs.fstat()`][], and
63676367
their synchronous counterparts are of this type.
63686368
If `bigint` in the `options` passed to those methods is true, the numeric values
63696369
will be `bigint` instead of `number`, and the object will contain additional
@@ -7010,7 +7010,7 @@ The following constants are meant for use with `fs.open()`.
70107010
</table>
70117011
70127012
On Windows, only `O_APPEND`, `O_CREAT`, `O_EXCL`, `O_RDONLY`, `O_RDWR`,
7013-
`O_TRUNC`, `O_WRONLY` and `UV_FS_O_FILEMAP` are available.
7013+
`O_TRUNC`, `O_WRONLY`, and `UV_FS_O_FILEMAP` are available.
70147014
70157015
##### File type constants
70167016
@@ -7521,7 +7521,7 @@ fs.open('<directory>', 'a+', (err, fd) => {
75217521
```
75227522
75237523
On Windows, opening an existing hidden file using the `'w'` flag (either
7524-
through `fs.open()` or `fs.writeFile()` or `fsPromises.open()`) will fail with
7524+
through `fs.open()`, `fs.writeFile()`, or `fsPromises.open()`) will fail with
75257525
`EPERM`. Existing hidden files can be opened for writing with the `'r+'` flag.
75267526
75277527
A call to `fs.ftruncate()` or `filehandle.truncate()` can be used to reset

0 commit comments

Comments
 (0)