Skip to content

Commit 44c8ea3

Browse files
mcollinajasnell
authored andcommitted
doc,stream: clarify 'data', pipe() and 'readable'
We stated that 'data' and pipe() are preferred over 'readable'. This commit clarifies that 'data' and pipe() are easier to understand, but 'readable' might result in increased throughput. Fixes: #11587 PR-URL: #13432 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 641979b commit 44c8ea3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/stream.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,8 @@ end
768768
```
769769

770770
*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
771-
preferred over the use of the `'readable'` event.
771+
easier to understand than the `'readable'` event.
772+
However, handling `'readable'` might result in increased throughput.
772773

773774
##### readable.isPaused()
774775
<!-- YAML

0 commit comments

Comments
 (0)