first-chunk-stream

Transform the first chunk in a stream

MIT License

Downloads
5.8M
Stars
27
Committers
8

Bot releases are hidden (Show)

first-chunk-stream - Latest Release

Published by sindresorhus 12 months ago

Breaking

  • Require Node.js 18 dbbc909
  • The 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

first-chunk-stream -

Published by sindresorhus about 3 years ago

Breaking

  • Require Node.js 12.20 d80107c
  • This package is now pure ESM. Please read this.

https://github.com/sindresorhus/first-chunk-stream/compare/v4.0.0...v5.0.0

first-chunk-stream -

Published by sindresorhus over 5 years ago

Breaking:

  • Make the transform function an async function instead of callback-style (#7) e79bc5e
  • Rename the chunkLength option to chunkSize (#7) e79bc5e

Enhancements:

  • Add FirstChunkStream.stop which can be returned in the transform function to end the stream early (#7) e79bc5e

https://github.com/sindresorhus/first-chunk-stream/compare/v3.0.0...v4.0.0

first-chunk-stream -

Published by sindresorhus over 5 years ago

Breaking:

  • Require Node.js 8 (#5) 6bf89bb

Enhancements:

  • Add TypeScript definition (#5) 6bf89bb

https://github.com/sindresorhus/first-chunk-stream/compare/v2.0.0...v3.0.0

first-chunk-stream - 2.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!