sindresorhus / get-stream

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

Implement maxBuffer checks. Fixes #8. #12

Closed jamestalmage closed 8 years ago

jamestalmage commented 8 years ago

All methods now take an options object, and all honor the maxBuffer option.

If maxBuffer is set to a number, the promise will reject once the specified limit is reached.

Changes the behavior of the array method slightly, as it now honors an encoding option:

sindresorhus commented 8 years ago

👍 Can you update the docs? Make sure to mention the .array() behavior.

jamestalmage commented 8 years ago

Updated.

Let me know once it's merged and published so I can update the execa PR.