summaryrefslogtreecommitdiff
path: root/doc/api/stream.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r--doc/api/stream.md38
1 files changed, 24 insertions, 14 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 85afb631ae..4cb9907202 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -424,8 +424,8 @@ stream.write('data ');
process.nextTick(() => stream.uncork());
```
-If the [`writable.cork()`][] method is called multiple times on a stream, the same
-number of calls to `writable.uncork()` must be called to flush the buffered
+If the [`writable.cork()`][] method is called multiple times on a stream, the
+same number of calls to `writable.uncork()` must be called to flush the buffered
data.
```js
@@ -620,8 +620,8 @@ possible states:
When `readable.readableFlowing` is `null`, no mechanism for consuming the
streams data is provided so the stream will not generate its data. While in this
-state, attaching a listener for the `'data'` event, calling the `readable.pipe()`
-method, or calling the `readable.resume()` method will switch
+state, attaching a listener for the `'data'` event, calling the
+`readable.pipe()` method, or calling the `readable.resume()` method will switch
`readable.readableFlowing` to `true`, causing the Readable to begin
actively emitting events as data is generated.
@@ -1193,8 +1193,9 @@ async function print(readable) {
print(fs.createReadStream('file')).catch(console.log);
```
-If the loop terminates with a `break` or a `throw`, the stream will be destroyed.
-In other terms, iterating over a stream will consume the stream fully.
+If the loop terminates with a `break` or a `throw`, the stream will be
+destroyed. In other terms, iterating over a stream will consume the stream
+fully.
### Duplex and Transform Streams
@@ -1305,8 +1306,11 @@ on the type of stream being created, as detailed in the chart below:
<p>[Writable](#stream_class_stream_writable)</p>
</td>
<td>
- <p><code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code>,
- <code>[_final][stream-_final]</code></p>
+ <p>
+ <code>[_write][stream-_write]</code>,
+ <code>[_writev][stream-_writev]</code>,
+ <code>[_final][stream-_final]</code>
+ </p>
</td>
</tr>
<tr>
@@ -1317,8 +1321,11 @@ on the type of stream being created, as detailed in the chart below:
<p>[Duplex](#stream_class_stream_duplex)</p>
</td>
<td>
- <p><code>[_read][stream-_read]</code>, <code>[_write][stream-_write]</code>, <code>[_writev][stream-_writev]</code>,
- <code>[_final][stream-_final]</code></p>
+ <p>
+ <code>[_read][stream-_read]</code>,
+ <code>[_write][stream-_write]</code>,
+ <code>[_writev][stream-_writev]</code>,
+ <code>[_final][stream-_final]</code></p>
</td>
</tr>
<tr>
@@ -1329,8 +1336,11 @@ on the type of stream being created, as detailed in the chart below:
<p>[Transform](#stream_class_stream_transform)</p>
</td>
<td>
- <p><code>[_transform][stream-_transform]</code>, <code>[_flush][stream-_flush]</code>,
- <code>[_final][stream-_final]</code></p>
+ <p>
+ <code>[_transform][stream-_transform]</code>,
+ <code>[_flush][stream-_flush]</code>,
+ <code>[_final][stream-_final]</code>
+ </p>
</td>
</tr>
</table>
@@ -1636,8 +1646,8 @@ constructor and implement the `readable._read()` method.
a single value instead of a Buffer of size n. Defaults to `false`
* `read` {Function} Implementation for the [`stream._read()`][stream-_read]
method.
- * `destroy` {Function} Implementation for the [`stream._destroy()`][readable-_destroy]
- method.
+ * `destroy` {Function} Implementation for the
+ [`stream._destroy()`][readable-_destroy] method.
```js
const { Readable } = require('stream');