sindresorhus / get-stream

Get a stream as a string, Buffer, ArrayBuffer or array
MIT License
341 stars 33 forks source link

Why not concat-stream? #1

Closed anandthakker closed 9 years ago

anandthakker commented 9 years ago

Probably a good chance that you're already aware of concat-stream, but in case not: https://github.com/maxogden/concat-stream

If there's a reason that this wouldn't use that, it would be great to know in the README

sindresorhus commented 9 years ago

This one accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string or buffer. It doesn't have a fragile type inference, you explicitly choose what you want. It supports back-pressure. And it doesn't depend on the huge readable-stream dependency.