-
Notifications
You must be signed in to change notification settings - Fork 50
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
Use map-stream to transform streams - code refactor #11
Conversation
Use map-stream to transform streams - code refactor
Yep, that's better. But I won't publish a new version for that if it's ok for you. |
Yeah definitely not worth publishing new version. I was just playing with streams and I thought that this might be a good refactor. |
Oh, I just saw that you set the encoding on the stdout (instead of on phridge's stream). I won't do that since someone might want to use the raw buffer for other stuff (though I don't know if that's possible at all with phridge using the EOL-character to split messages). It's just that we don't need to force the whole stdout to be interpreted as character stream. |
I'm surprised that it still works when removing it... I'd expect |
I'm not sure but linearstream might change it to character stream. Same might be true for map-stream. I'm new to streams :) |
Yes, you're right. It's phridge's technique which uses an But afaik it's not possible to use raw buffer data in PhantomJS anyway. I was just setting in on phridge's stream because I just didn't need to set it on the whole stdout. |
I'm afraid we can't change that. However, a consumer can turn it back into a raw Buffer... |
Thx for explaining. |
Hi
I'm not sure about: stdout.setEncoding("utf8");
I think its not even necessary to add it at all.