mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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: https://github.com/nodejs/node/issues/11587 PR-URL: https://github.com/nodejs/node/pull/13432 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
641979b213
commit
44c8ea32df
1 file changed
+2
-1
+2
-1
@@ -768,7 +768,8 @@ end
|
||||
```
|
||||
|
||||
*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
|
||||
preferred over the use of the `'readable'` event.
|
||||
easier to understand than the `'readable'` event.
|
||||
However, handling `'readable'` might result in increased throughput.
|
||||
|
||||
##### readable.isPaused()
|
||||
<!-- YAML
|
||||
|
||||
Reference in new issue
Block a user