Skip to content

Commit

Permalink
doc,stream: clarify 'data', pipe() and 'readable'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcollina authored and jasnell committed Jun 5, 2017
1 parent 641979b commit 44c8ea3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44c8ea3

Please sign in to comment.