[nodejs] In non-objectMode streams, is it safe to assume chunks are apples-to-apples?

2013-12-17 Thread Stephen Bartell
To answer my own question, yes it's ok. Readables have internal buffers. When I push, im putting the whole thing on the buffer. Should've read _stream_readable.js first :) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Gu

[nodejs] In non-objectMode streams, is it safe to assume chunks are apples-to-apples?

2013-12-16 Thread Stephen Bartell
On the writable end, I push a `JSON.stringify`d object. On the other reader end, can I expect `chunk` to be `JSON.parse` -able? When running the code below, it seems like it. Like, it works and I can't logically make sense of it. I would expect that if not in objectMode, the reader will need t