doc: add note to readable stream async iterator
PR-URL: https://github.com/nodejs/node/pull/19331 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
897f7b6c6b
commit
45c86e33e1
@ -1208,7 +1208,10 @@ print(fs.createReadStream('file')).catch(console.log);
|
||||
|
||||
If the loop terminates with a `break` or a `throw`, the stream will be
|
||||
destroyed. In other terms, iterating over a stream will consume the stream
|
||||
fully.
|
||||
fully. The stream will be read in chunks of size equal to the `highWaterMark`
|
||||
option. In the code example above, data will be in a single chunk if the file
|
||||
has less then 64kb of data because no `highWaterMark` option is provided to
|
||||
[`fs.createReadStream()`][].
|
||||
|
||||
### Duplex and Transform Streams
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user