Skip to content

Commit 3aa49be

Browse files
committed
doc: generalize the note after rewiew suggestions
1 parent 042cf85 commit 3aa49be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/api/stream.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,9 +1198,10 @@ print(fs.createReadStream('file')).catch(console.log);
11981198
If the loop terminates with a `break` or a `throw`, the stream will be
11991199
destroyed. In other terms, iterating over a stream will consume the stream
12001200
fully.
1201-
Note that by default, async reading of the contents of the file will be
1202-
performed by chunks of size equal to `highWaterMark` value (default is 64kb
1203-
for [`fs.createReadStream()`][]).
1201+
The stream will be read in chunks of size equal to the `highWaterMark` option.
1202+
In the code example above, data will be in a single chunk if the file has less
1203+
then 64kb of data because no `highWaterMark` option is provided to
1204+
[`fs.createReadStream()`][].
12041205

12051206
### Duplex and Transform Streams
12061207

0 commit comments

Comments
 (0)