From 45c86e33e19e4597108e9c0c0d4b7cef77ad1c73 Mon Sep 17 00:00:00 2001 From: Ivan Filenko Date: Tue, 13 Mar 2018 23:45:51 +0300 Subject: [PATCH] doc: add note to readable stream async iterator PR-URL: https://github.com/nodejs/node/pull/19331 Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell --- doc/api/stream.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 814acc69d6a964..01405556674e82 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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