Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update file.js - objectMode writable stream #632

Closed
wants to merge 2 commits into from

Conversation

stambata
Copy link

Appending this.eol explicitly to the result that common.log returns makes the output always become a string. That eliminates the possibility of piping js objects to the writable stream (which could be extremely handy for some cases). The proposed change won't break the code as the only case for the output not to be a string would be if this.stringify is explicitly rewritten to return objects (i.e. transport.stringify = function(obj){return obj})

Appending this.eol explicitly to the result that common.log returns makes the output always become a string. That eliminates the possibility of piping js objects to the writable stream (which could be extremely handy for some cases). The proposed change won't break the code as the only case for the output not to be an object would be if this.stringify is explicitly rewritten to return objects (i.e. transport.stringify = function(obj){return obj})
@indexzero
Copy link
Member

I am +1 on this. Could you add some tests?

@indexzero indexzero added the Feature Request Request for new functionality to support use cases not already covered label May 19, 2015
indexzero added a commit that referenced this pull request Oct 29, 2015
@indexzero
Copy link
Member

Fixed in 79ba840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request for new functionality to support use cases not already covered
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants