Readable stream : objectMode ignored? #4662
Comments
Seems to be a minsunderstanding about the role of Maybe an issue in my brain, or in documentation, not sure yet. |
The reason why it does the same thing with Maybe what we need is a |
Hmm, maybe |
Sure. Explicit false should prevent implicit objectMode. |
@isaacs I also don't mind objectMode defaulting to I'm going to always manually pass in |
+1 for what @Raynos said |
@Raynos @TooTallNate See #4835 Let's just remove the objectMode automatic switch entirely. It's too magical. |
Only handle objects if explicitly told to do so in the options object. Non-buffer/string chunks are an error if not already in objectMode. Close nodejs#4662
Only handle objects if explicitly told to do so in the options object. Non-buffer/string chunks are an error if not already in objectMode. Close nodejs#4662
Code to be tested:
As expected, it outputs:
But what I'm not expecting, is the same exact output with
objectMode: false
.I was expecting a fallback to previous behavior, which still was buggy in my opinon, but still less that ignoring an option ;)
Is this expected? What am I missing?
Note: in 0.9.7 this code just doesn't write anything, it just stops reading stream as soon as a non-string-or-buffer value is met, without emitting "end" ever.
The text was updated successfully, but these errors were encountered: