Skip to content

Commit

Permalink
doc: remove warning against readable/readable.read
Browse files Browse the repository at this point in the history
Remove suggestion to avoid `readable` event and `readabe.read()` method.
No explanation was provided for this suggestion.

Backport-PR-URL: #22380
PR-URL: #19193
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chen Gang <gangc.cxy@foxmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Sep 6, 2018
1 parent 94d27e2 commit 7ed297d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,6 @@ readable.on('readable', () => {
});
```

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
`size` argument.
Expand Down

0 comments on commit 7ed297d

Please sign in to comment.