Get a stream as a string, Buffer, ArrayBuffer or array
MIT License
Bot releases are hidden (Show)
ReadableStream[Symbol.asyncIterator]
ponyfill (#128) df42674https://github.com/sindresorhus/get-stream/compare/v9.0.0...v9.0.1
https://github.com/sindresorhus/get-stream/compare/v8.0.1...v9.0.0
error.bufferedData
is as full as possible. (#106)maxBuffer
option being one byte off in some edge case. (#105)https://github.com/sindresorhus/get-stream/compare/v8.0.0...v8.0.1
Huge thanks to @ehmicky for doing all the work for this release 🙌
encoding
option. (#69, #67)
buffer.toString('hex')
or buffer.toString('base64')
can also be used.ReadableStream
). (#82, #78, #79, #80)getStreamAsArray()
method to pass streams in object mode. (#86)getStreamAsArrayBuffer()
method to return the stream as an ArrayBuffer
. (#81)ArrayBuffer
, set error.bufferedData
with the partially read data instead of leaving it empty. (#68, #48)maxBuffer
stops infinite streams. (#62)maxBuffer
. (#42, #69).error.bufferedData
when the stream errors for other reasons than maxBuffer
. (#56, #63)error.bufferedData
is smaller than maxBuffer
. (#89)stream
argument must be a Readable
, ReadableStream
or AsyncIterable
. (#71)Blob
and JSON streaming. (#58, #95, #96, #97)https://github.com/sindresorhus/get-stream/compare/v7.0.1...v8.0.0
https://github.com/sindresorhus/get-stream/compare/v7.0.0...v7.0.1
getStream.array()
readableStream.toArray()
instead. Example
const getStream = require('get-stream'); getStream.buffer(…);
→ import {getStreamAsBuffer} from 'get-stream'; getStreamAsBuffer(…);
const getStream = require('get-stream'); getStream.MaxBufferError;
→ import {MaxBufferError} from 'get-stream'; MaxBufferError;
You may not need this package anymore.
https://github.com/sindresorhus/get-stream/compare/v6.0.1...v7.0.0
.buffer()
method (#44) 0ee784ahttps://github.com/sindresorhus/get-stream/compare/v6.0.0...v6.0.1
import getStream from 'get-stream';
to import getStream = require('get-stream');
stream.pipeline
instead of pump
package (#39) 5cf31bahttps://github.com/sindresorhus/get-stream/compare/v5.2.0...v6.0.0
maxBuffer
option to be set to Buffer MAX_LENGTH
(#40) 127d83chttps://github.com/sindresorhus/get-stream/compare/v5.1.0...v5.2.0
https://github.com/sindresorhus/get-stream/compare/v5.0.0...v5.1.0
Breaking:
Enhancements:
https://github.com/sindresorhus/get-stream/compare/v4.1.0...v5.0.0