@@ -184,7 +184,7 @@ changes:
184
184
- v15.14.0
185
185
- v14.18.0
186
186
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`.
188
188
- version: v14.0.0
189
189
pr-url: https://github.com/nodejs/node/pull/31030
190
190
description: The `data` parameter won't coerce unsupported input to
@@ -690,7 +690,7 @@ changes:
690
690
- v15.14.0
691
691
- v14.18.0
692
692
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` .
694
694
- version: v14.0.0
695
695
pr-url: https://github.com/nodejs/node/pull/31030
696
696
description: The ` data` parameter won't coerce unsupported input to
@@ -704,7 +704,7 @@ changes:
704
704
* Returns: {Promise}
705
705
706
706
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.
708
708
The promise is resolved with no arguments upon success.
709
709
710
710
If ` options` is a string, then it specifies the ` encoding` .
@@ -1470,7 +1470,7 @@ The `atime` and `mtime` arguments follow these rules:
1470
1470
1471
1471
* Values can be either numbers representing Unix epoch time, `Date`s, or a
1472
1472
numeric string like `'123456789.0'`.
1473
- * If the value can not be converted to a number, or is `NaN`, `Infinity` or
1473
+ * If the value can not be converted to a number, or is `NaN`, `Infinity`, or
1474
1474
`-Infinity`, an `Error` will be thrown.
1475
1475
1476
1476
### `fsPromises.watch(filename[, options])`
@@ -1534,7 +1534,7 @@ changes:
1534
1534
- v15.14.0
1535
1535
- v14.18.0
1536
1536
pr-url: https://github.com/nodejs/node/pull/37490
1537
- description: The `data` argument supports `AsyncIterable`, `Iterable` and `Stream`.
1537
+ description: The `data` argument supports `AsyncIterable`, `Iterable`, and `Stream`.
1538
1538
- version:
1539
1539
- v15.2.0
1540
1540
- v14.17.0
@@ -1557,7 +1557,7 @@ changes:
1557
1557
* Returns: {Promise} Fulfills with `undefined` upon success.
1558
1558
1559
1559
Asynchronously writes data to a file, replacing the file if it already exists.
1560
- `data` can be a string, a buffer, an {AsyncIterable} or {Iterable} object.
1560
+ `data` can be a string, a buffer, an {AsyncIterable}, or an {Iterable} object.
1561
1561
1562
1562
The `encoding` option is ignored if `data` is a buffer.
1563
1563
@@ -1682,7 +1682,7 @@ access(file, constants.R_OK | constants.W_OK, (err) => {
1682
1682
```
1683
1683
1684
1684
Do not use `fs.access()` to check for the accessibility of a file before calling
1685
- `fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing
1685
+ `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
1686
1686
so introduces a race condition, since other processes may change the file's
1687
1687
state between the two calls. Instead, user code should open/read/write the
1688
1688
file directly and handle the error raised if the file is not accessible.
@@ -1969,17 +1969,17 @@ specifies the permissions for others.
1969
1969
1970
1970
For example, the octal value `0o765` means:
1971
1971
1972
- * The owner may read, write and execute the file.
1972
+ * The owner may read, write, and execute the file.
1973
1973
* The group may read and write the file.
1974
1974
* Others may read and execute the file.
1975
1975
1976
1976
When using raw numbers where file modes are expected, any value larger than
1977
1977
`0o777` may result in platform-specific behaviors that are not supported to work
1978
- consistently. Therefore constants like `S_ISVTX`, `S_ISGID` or `S_ISUID` are not
1979
- exposed in `fs.constants`.
1978
+ consistently. Therefore constants like `S_ISVTX`, `S_ISGID`, or `S_ISUID` are
1979
+ not exposed in `fs.constants`.
1980
1980
1981
1981
Caveats: on Windows only the write permission can be changed, and the
1982
- distinction among the permissions of group, owner or others is not
1982
+ distinction among the permissions of group, owner, or others is not
1983
1983
implemented.
1984
1984
1985
1985
### `fs.chown(path, uid, gid, callback)`
@@ -2350,7 +2350,7 @@ By default, the stream will emit a `'close'` event after it has been
2350
2350
destroyed. Set the `emitClose` option to `false` to change this behavior.
2351
2351
2352
2352
By providing the `fs` option it is possible to override the corresponding `fs`
2353
- implementations for `open`, `write`, `writev` and `close`. Overriding `write()`
2353
+ implementations for `open`, `write`, `writev`, and `close`. Overriding `write()`
2354
2354
without `writev()` can reduce performance as some optimizations (`_writev()`)
2355
2355
will be disabled. When providing the `fs` option, overrides for at least one of
2356
2356
`write` and `writev` are required. If no `fd` option is supplied, an override
@@ -2405,7 +2405,7 @@ has only one boolean parameter. This is one reason `fs.access()` is recommended
2405
2405
instead of `fs.exists()`.
2406
2406
2407
2407
Using `fs.exists()` to check for the existence of a file before calling
2408
- `fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing
2408
+ `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
2409
2409
so introduces a race condition, since other processes may change the file's
2410
2410
state between the two calls. Instead, user code should open/read/write the
2411
2411
file directly and handle the error raised if the file does not exist.
@@ -2755,7 +2755,7 @@ changes:
2755
2755
it will emit a deprecation warning with id DEP0013.
2756
2756
- version: v4.1.0
2757
2757
pr-url: https://github.com/nodejs/node/pull/2387
2758
- description: Numeric strings, `NaN` and `Infinity` are now allowed
2758
+ description: Numeric strings, `NaN`, and `Infinity` are now allowed
2759
2759
time specifiers.
2760
2760
-->
2761
2761
@@ -3252,7 +3252,7 @@ changes:
3252
3252
- v12.17.0
3253
3253
pr-url: https://github.com/nodejs/node/pull/31402
3254
3254
description: Options object can be passed in
3255
- to make Buffer , offset, length and position optional.
3255
+ to make buffer , offset, length, and position optional.
3256
3256
-->
3257
3257
3258
3258
* ` fd` {integer}
@@ -3607,7 +3607,7 @@ changes:
3607
3607
* ` err` {Error }
3608
3608
* ` resolvedPath` {string| Buffer}
3609
3609
3610
- Asynchronously computes the canonical pathname by resolving ` .` , ` ..` and
3610
+ Asynchronously computes the canonical pathname by resolving ` .` , ` ..` , and
3611
3611
symbolic links.
3612
3612
3613
3613
A canonical pathname is not necessarily unique . Hard links and bind mounts can
@@ -3869,7 +3869,7 @@ Asynchronous stat(2). The callback gets two arguments `(err, stats)` where
3869
3869
In case of an error, the ` err.code` will be one of [Common System Errors][].
3870
3870
3871
3871
Using ` fs.stat()` to check for the existence of a file before calling
3872
- ` fs.open()` , ` fs.readFile()` or ` fs.writeFile()` is not recommended.
3872
+ ` fs.open()` , ` fs.readFile()` , or ` fs.writeFile()` is not recommended.
3873
3873
Instead, user code should open/ read/ write the file directly and handle the
3874
3874
error raised if the file is not available.
3875
3875
@@ -4153,7 +4153,7 @@ changes:
4153
4153
it will emit a deprecation warning with id DEP0013 .
4154
4154
- version: v4.1 .0
4155
4155
pr- url: https: // github.com/nodejs/node/pull/2387
4156
- description: Numeric strings, ` NaN` and ` Infinity` are now allowed
4156
+ description: Numeric strings, ` NaN` , and ` Infinity` are now allowed
4157
4157
time specifiers.
4158
4158
-->
4159
4159
@@ -4169,7 +4169,7 @@ The `atime` and `mtime` arguments follow these rules:
4169
4169
4170
4170
* Values can be either numbers representing Unix epoch time in seconds,
4171
4171
` Date` s, or a numeric string like ` '123456789.0'` .
4172
- * If the value can not be converted to a number, or is ` NaN` , ` Infinity` or
4172
+ * If the value can not be converted to a number, or is ` NaN` , ` Infinity` , or
4173
4173
` -Infinity` , an ` Error` will be thrown.
4174
4174
4175
4175
### ` fs.watch(filename[, options][, listener])`
@@ -5063,7 +5063,7 @@ added: v0.4.2
5063
5063
changes:
5064
5064
- version: v4.1.0
5065
5065
pr-url: https://github.com/nodejs/node/pull/2387
5066
- description: Numeric strings, ` NaN ` and ` Infinity ` are now allowed
5066
+ description: Numeric strings, ` NaN ` , and ` Infinity ` are now allowed
5067
5067
time specifiers.
5068
5068
-->
5069
5069
@@ -5425,7 +5425,7 @@ changes:
5425
5425
- v12.17.0
5426
5426
pr-url: https://github.com/nodejs/node/pull/32460
5427
5427
description: Options object can be passed in
5428
- to make offset, length and position optional.
5428
+ to make offset, length, and position optional.
5429
5429
-->
5430
5430
5431
5431
* ` fd` {integer}
@@ -5730,7 +5730,7 @@ changes:
5730
5730
protocol.
5731
5731
- version: v4.1.0
5732
5732
pr-url: https://github.com/nodejs/node/pull/2387
5733
- description: Numeric strings, ` NaN ` and ` Infinity ` are now allowed
5733
+ description: Numeric strings, ` NaN ` , and ` Infinity ` are now allowed
5734
5734
time specifiers.
5735
5735
-->
5736
5736
@@ -6357,7 +6357,7 @@ changes:
6357
6357
6358
6358
A {fs.Stats} object provides information about a file.
6359
6359
6360
- Objects returned from [` fs .stat ()` ][], [` fs .lstat ()` ][] and [` fs .fstat ()` ][] and
6360
+ Objects returned from [` fs .stat ()` ][], [` fs .lstat ()` ][], [` fs .fstat ()` ][], and
6361
6361
their synchronous counterparts are of this type.
6362
6362
If ` bigint` in the ` options` passed to those methods is true, the numeric values
6363
6363
will be ` bigint` instead of ` number` , and the object will contain additional
@@ -7004,7 +7004,7 @@ The following constants are meant for use with `fs.open()`.
7004
7004
</table>
7005
7005
7006
7006
On Windows, only ` O_APPEND ` , ` O_CREAT ` , ` O_EXCL ` , ` O_RDONLY ` , ` O_RDWR ` ,
7007
- ` O_TRUNC ` , ` O_WRONLY ` and ` UV_FS_O_FILEMAP ` are available.
7007
+ ` O_TRUNC ` , ` O_WRONLY ` , and ` UV_FS_O_FILEMAP ` are available.
7008
7008
7009
7009
##### File type constants
7010
7010
@@ -7515,7 +7515,7 @@ fs.open('<directory>', 'a+', (err, fd) => {
7515
7515
` ` `
7516
7516
7517
7517
On Windows, opening an existing hidden file using the ` ' w' ` flag (either
7518
- through ` fs .open ()` or ` fs .writeFile ()` or ` fsPromises .open ()` ) will fail with
7518
+ through ` fs .open ()` , ` fs .writeFile ()` , or ` fsPromises .open ()` ) will fail with
7519
7519
` EPERM ` . Existing hidden files can be opened for writing with the ` ' r+' ` flag.
7520
7520
7521
7521
A call to ` fs .ftruncate ()` or ` filehandle .truncate ()` can be used to reset
0 commit comments