We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b165be commit 618e4ecCopy full SHA for 618e4ec
doc/api/stream.markdown
@@ -164,6 +164,9 @@ readable.on('readable', function() {
164
Once the internal buffer is drained, a `readable` event will fire
165
again when more data is available.
166
167
+The `readable` event is not emitted in the "flowing" mode with the
168
+sole exception of the last one, on end-of-stream.
169
+
170
#### Event: 'data'
171
172
* `chunk` {Buffer | String} The chunk of data.
@@ -181,6 +184,9 @@ readable.on('data', function(chunk) {
181
184
console.log('got %d bytes of data', chunk.length);
182
185
});
183
186
```
187
+Note that the `readable` event should not be used together with `data`
188
+because the assigning the latter switches the stream into "flowing" mode,
189
+so the `readable` event will not be emitted.
190
191
#### Event: 'end'
192
0 commit comments