sindresorhus / get-stream

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

Remove `encoding` option #69

Closed ehmicky closed 1 year ago

ehmicky commented 1 year ago

Fixes #67.

This removes the encoding option.

This is a breaking change for users who used the encoding option with getStream() (not with getStreamAsBuffer()) except if they used encoding: undefined, encoding: null or encoding: 'utf8. For users who used encoding: 'hex', please convert to hexadecimal using Buffer.from(string).toString('hex'). For those who used encoding: 'base64', please convert to base64 using either Buffer.from(string).toString('base64') or (for better performance on big streams) with b64.