Skip to content

Commit

Permalink
doc: make suggestion more direct in stream.md
Browse files Browse the repository at this point in the history
PR-URL: #19124
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott authored and MylesBorins committed Mar 20, 2018
1 parent 8d33e5c commit 9ec0eab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -942,9 +942,8 @@ readable.on('readable', () => {
});
```

In general, it is recommended that developers avoid the use of the `'readable'`
event and the `readable.read()` method in favor of using either
`readable.pipe()` or the `'data'` event.
Avoid the use of the `'readable'` event and the `readable.read()` method in
favor of using either `readable.pipe()` or the `'data'` event.

A Readable stream in object mode will always return a single item from
a call to [`readable.read(size)`][stream-read], regardless of the value of the
Expand Down

0 comments on commit 9ec0eab

Please sign in to comment.