doc: remove warning against readable/readable.read

Remove suggestion to avoid `readable` event and `readabe.read()` method.
No explanation was provided for this suggestion.

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rich Trott 2018-03-06 22:33:44 -08:00
parent 3dfce5cdad
commit 0f05173f49

View File

@ -955,9 +955,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 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 a call to [`readable.read(size)`][stream-read], regardless of the value of the
`size` argument. `size` argument.