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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
mcollina committed Jun 5, 2017
1 parent 0b432e0 commit 5ca836c
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 5ca836c

Please sign in to comment.