Transform the first chunk in a stream
MIT License
Bot releases are visible (Hide)
chunk
provided in the transform function is now a Uint8Array
instead of Buffer
(#10) b373f64
https://github.com/sindresorhus/first-chunk-stream/compare/v5.0.0...v6.0.0
https://github.com/sindresorhus/first-chunk-stream/compare/v4.0.0...v5.0.0
Breaking:
transform
function an async function instead of callback-style (#7) e79bc5echunkLength
option to chunkSize
(#7) e79bc5eEnhancements:
FirstChunkStream.stop
which can be returned in the transform
function to end the stream early (#7) e79bc5ehttps://github.com/sindresorhus/first-chunk-stream/compare/v3.0.0...v4.0.0
Breaking:
Enhancements:
https://github.com/sindresorhus/first-chunk-stream/compare/v2.0.0...v3.0.0
Published by sindresorhus about 9 years ago
Rewritten to give you exactly the size you request through a chunkLength
option instead of the previous minSize
option, which could be larger than the wanted size. It's now also a Duplex stream instead of a Transform stream.
Huge thanks to @nfroidure for the rewrite!