Skip to content

Commit

Permalink
doc: add note to readable stream async iterator
Browse files Browse the repository at this point in the history
PR-URL: #19331
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
prog1dev authored and Trott committed Mar 19, 2018
1 parent 897f7b6 commit 45c86e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 45c86e3

Please sign in to comment.