sindresorhus / get-stream

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

use end-of-stream instead of end event? #23

Closed yocontra closed 6 years ago

yocontra commented 6 years ago

there's a lot of complexity with finding a stream end, this library looks like it just listens for the end event which is not the case for many streams. specifically having an issue where destroy being called on a stream will leave get-stream waiting forever even though the stream is done.

using https://github.com/mafintosh/end-of-stream should fix this problem and make this library more adept with stream ends

if interested, i can send a PR

sindresorhus commented 6 years ago

👍