{"_id":"@cjser/first-chunk-min-size-stream","name":"@cjser/first-chunk-min-size-stream","dist-tags":{"latest":"3.0.0-cjser.2"},"versions":{"3.0.0-cjser.2":{"name":"@cjser/first-chunk-min-size-stream","version":"3.0.0-cjser.2","description":"Set the minimum size of the first chunk in a stream","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"require":"./dist-cjser/index.cjs","default":"./index.js"},"engines":{"node":">=12"},"scripts":{"test":"xo && ava"},"keywords":["buffer","string","stream","streams","transform","first","chunk","size","min","minimum"],"devDependencies":{"ava":"^3.15.0","get-stream":"^6.0.1","xo":"^0.39.1"},"main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"3.0.0","cjserVersion":2,"original":{"name":"first-chunk-min-size-stream","version":"3.0.0","exports":"./index.js","repository":"sindresorhus/first-chunk-min-size-stream","files":["index.js"],"scripts":{"test":"xo && ava"}}},"_id":"@cjser/first-chunk-min-size-stream@3.0.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-VzBCUMpgveNtRYo9/+nxUm/5N3aNZrV4pT8gn8Y99shv7U6qouQ/Fi4I4WEDZhITjr/H6RTAXnC/4E3y5FtZaw==","shasum":"c0dedd166e3bc09ded21ebed3f64ff9685615c77","tarball":"https://registry.npmjs.org/@cjser/first-chunk-min-size-stream/-/first-chunk-min-size-stream-3.0.0-cjser.2.tgz","fileCount":5,"unpackedSize":6416,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDXuESnMCkLm6v47iofkrQEouhLU9GVe4/4dk8+dIMZ2AIgI8x4OuyhbRSGPq21M9AmLCK/c/fpFcI+4tezXLkW0KU="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/first-chunk-min-size-stream_3.0.0-cjser.2_1778158147484_0.5397017286056898"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:49:07.374Z","3.0.0-cjser.2":"2026-05-07T12:49:07.614Z","modified":"2026-05-07T12:49:07.870Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Set the minimum size of the first chunk in a stream","keywords":["buffer","string","stream","streams","transform","first","chunk","size","min","minimum"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# first-chunk-min-size-stream\n\n> Set the minimum size of the first chunk in a stream\n\nUseful if you want to do something to the first chunk and need it to be of a certain size.\n\n## Install\n\n```\n$ npm install first-chunk-min-size-stream\n```\n\n## Usage\n\n```js\nimport fs from 'node:fs';\nimport FirstChunkMinSize from 'first-chunk-min-size-stream';\n\nfs.createReadStream('unicorn.txt', {highWaterMark: 1}) // `highWaterMark: 1` means it will only read 1 byte at the time\n\t.pipe(new FirstChunkMinSize({minSize: 7}))\n\t.once('data', data => {\n\t\tconsole.log(data.length);\n\t\t//=> 7\n\t});\n```\n\n## API\n\n### firstChunkMinSize(options)\n\n#### options\n\nType: `object`\n\n##### minSize\n\n*Required*\\\nType: `number`\n\nThe minimum size of the first chunk.\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/first-chunk-min-size-stream\n","readmeFilename":"readme.md","_rev":"1-f05348dfcb6dd4bdf60e1fa66811b8a0"}