Skip to content

Commit 5ca836c

Browse files
committed
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 <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 0b432e0 commit 5ca836c

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)