diff options
author | Rich Trott <rtrott@gmail.com> | 2019-10-24 15:19:07 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-26 16:33:24 -0700 |
commit | 72346bd8d43477273419049ab68a5c6611480a92 (patch) | |
tree | 5519d5ba59ed5d9764de18990eff72f152faafd9 /doc/api/stream.md | |
parent | ab78d4df34a7698c45fca0b81300fd02fc4add7b (diff) | |
download | android-node-v8-72346bd8d43477273419049ab68a5c6611480a92.tar.gz android-node-v8-72346bd8d43477273419049ab68a5c6611480a92.tar.bz2 android-node-v8-72346bd8d43477273419049ab68a5c6611480a92.zip |
doc: remove "it is important to" phrasing
Instead of telling someone "It is important to do X", just tell them to
"Do X."
PR-URL: https://github.com/nodejs/node/pull/30108
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r-- | doc/api/stream.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 2e66bac0c0..fe59133261 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -100,7 +100,7 @@ maintaining an appropriate and efficient flow of data. For example, [`net.Socket`][] instances are [`Duplex`][] streams whose `Readable` side allows consumption of data received *from* the socket and whose `Writable` side allows writing data *to* the socket. Because data may be written to the socket at a -faster or slower rate than data is received, it is important for each side to +faster or slower rate than data is received, each side should operate (and buffer) independently of the other. ## API for Stream Consumers @@ -1658,11 +1658,11 @@ class MyWritable extends Writable { } ``` -When extending streams, it is important to keep in mind what options the user +When extending streams, keep in mind what options the user can and should provide before forwarding these to the base constructor. For -example, if the implementation makes assumptions in regard to e.g. the -`autoDestroy` and `emitClose` options, it becomes important to not allow the -user to override these. It is therefore recommended to be explicit about what +example, if the implementation makes assumptions in regard to the +`autoDestroy` and `emitClose` options, do not allow the +user to override these. Be explicit about what options are forwarded instead of implicitly forwarding all options. The new stream class must then implement one or more specific methods, depending @@ -2609,8 +2609,8 @@ readable.on('data', (chunk) => { #### Piping to Writable Streams from Async Iterators -In the scenario of writing to a writable stream from an async iterator, -it is important to ensure the correct handling of backpressure and errors. +In the scenario of writing to a writable stream from an async iterator, ensure +the correct handling of backpressure and errors. ```js const { once } = require('events'); |