Skip to content

Commit 45c86e3

Browse files
prog1devTrott
authored andcommitted
doc: add note to readable stream async iterator
PR-URL: #19331 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 897f7b6 commit 45c86e3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/api/stream.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,10 @@ print(fs.createReadStream('file')).catch(console.log);
12081208

12091209
If the loop terminates with a `break` or a `throw`, the stream will be
12101210
destroyed. In other terms, iterating over a stream will consume the stream
1211-
fully.
1211+
fully. The stream will be read in chunks of size equal to the `highWaterMark`
1212+
option. In the code example above, data will be in a single chunk if the file
1213+
has less then 64kb of data because no `highWaterMark` option is provided to
1214+
[`fs.createReadStream()`][].
12121215

12131216
### Duplex and Transform Streams
12141217

0 commit comments

Comments
 (0)