Skip to content

Commit 0d35bcd

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/stream.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,8 @@ end
739739
```
740740

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

744745
##### readable.isPaused()
745746
<!-- YAML

0 commit comments

Comments
 (0)