File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,9 @@ readable.on('readable', function() {
164
164
Once the internal buffer is drained, a ` readable ` event will fire
165
165
again when more data is available.
166
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
+
167
170
#### Event: 'data'
168
171
169
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.
184
190
185
191
#### Event: 'end'
186
192
You can’t perform that action at this time.
0 commit comments