{"_id":"@anio-node-foundation/fs-read-file-in-chunks","_rev":"2-362538112c9466d347f510c1d290fde9","name":"@anio-node-foundation/fs-read-file-in-chunks","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@anio-node-foundation/fs-read-file-in-chunks","version":"1.0.0","description":"Read a file in chunks asynchronously or synchronously.","main":"./dist/package.mjs","author":{"name":"Anio Software","email":"info@anio-software.de"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anio-node-foundation/fs-read-file-in-chunks.git"},"devDependencies":{"@anio-node-foundation/fs-api":"^2.0.1","@anio-software/npm-package-bundler":"^1.0.0"},"scripts":{"prepare":"npm-package-bundler ."},"_id":"@anio-node-foundation/fs-read-file-in-chunks@1.0.0","gitHead":"dfbb08fe5009098169a98edf9569d76af92368d3","bugs":{"url":"https://github.com/anio-node-foundation/fs-read-file-in-chunks/issues"},"homepage":"https://github.com/anio-node-foundation/fs-read-file-in-chunks#readme","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-PzGd1c645ZxxKZq5+ByjM8/qQNXd+BdC1/UC4vsgPppsB1DYwp88EtaLC4SxcpQOzLF+o5iOLtU1xNVHOzDYGQ==","shasum":"b57e78520d74c4d1882d81d99630b150db57bd64","tarball":"https://registry.npmjs.org/@anio-node-foundation/fs-read-file-in-chunks/-/fs-read-file-in-chunks-1.0.0.tgz","fileCount":3,"unpackedSize":7254,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anio-node-foundation%2ffs-read-file-in-chunks@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBpHI1M+880zlzVQTNIkI024EmuzY2ZI8Td9hzEvSNrgIhAP4g9aGNqMyebLPFfg6DVFSBFTTol6o3o2njTFLX8L4D"}]},"_npmUser":{"name":"dasdeo","email":"mark@anio.software"},"directories":{},"maintainers":[{"name":"dasdeo","email":"mark@anio.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-read-file-in-chunks_1.0.0_1709468778086_0.27690533605815526"},"_hasShrinkwrap":false},"2.0.0":{"name":"@anio-node-foundation/fs-read-file-in-chunks","version":"2.0.0","description":"Read a file in chunks asynchronously or synchronously.","main":"./build/package.mjs","author":{"name":"Anio Software","email":"info@anio.software"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anio-node-foundation/fs-read-file-in-chunks.git"},"devDependencies":{"@anio-node-foundation/fs-api":"^3.0.0","@vipen/target-js":"^0.7.0","vipen":"^0.1.0"},"scripts":{"prepare":"vipen ."},"_id":"@anio-node-foundation/fs-read-file-in-chunks@2.0.0","gitHead":"49d81e81f8a74d0ce87436d4636a240542ecff7b","bugs":{"url":"https://github.com/anio-node-foundation/fs-read-file-in-chunks/issues"},"homepage":"https://github.com/anio-node-foundation/fs-read-file-in-chunks#readme","_nodeVersion":"21.7.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-Y4WQsvTTb+Cmsb02QJtCoppe/h3C3nOIQUONXxSMseXptrpj/mENjXRA35CWvYo4AF69QPSl0c7JGKR88Mc5Ag==","shasum":"150148ab3eff94b2b0653a730189c3d3b45073f1","tarball":"https://registry.npmjs.org/@anio-node-foundation/fs-read-file-in-chunks/-/fs-read-file-in-chunks-2.0.0.tgz","fileCount":3,"unpackedSize":8138,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anio-node-foundation%2ffs-read-file-in-chunks@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5wkY0+cUM+MihZOZse5sLE2eXzZMXS0IAs+rfSjSybAiEA+g0mHZDORUQ2qRudcEy2tG3xaahHV+oBY9o1HIbUcNs="}]},"_npmUser":{"name":"exory2024","email":"exory@anio.software"},"directories":{},"maintainers":[{"name":"exory2024","email":"exory@anio.software"},{"name":"dasdeo","email":"mark@anio.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-read-file-in-chunks_2.0.0_1711402108771_0.337012609559864"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-03T12:26:17.977Z","1.0.0":"2024-03-03T12:26:18.230Z","modified":"2024-03-25T21:28:29.634Z","2.0.0":"2024-03-25T21:28:28.910Z"},"maintainers":[{"name":"exory2024","email":"exory@anio.software"},{"name":"dasdeo","email":"mark@anio.software"}],"description":"Read a file in chunks asynchronously or synchronously.","homepage":"https://github.com/anio-node-foundation/fs-read-file-in-chunks#readme","repository":{"type":"git","url":"git+https://github.com/anio-node-foundation/fs-read-file-in-chunks.git"},"author":{"name":"Anio Software","email":"info@anio.software"},"bugs":{"url":"https://github.com/anio-node-foundation/fs-read-file-in-chunks/issues"},"license":"MIT","readme":"# @anio-node-foundation/fs-read-file-in-chunks\n\nRead a file in chunks asynchronously or synchronously.\n\n```js\nimport nodeFsReadFileInChunks from \"@anio-node-foundation/fs-read-file-in-chunks\"\nimport {createHash} from \"node:crypto\"\n\nconst file = await nodeFsReadFileInChunks(\"./src/index.mjs\", 18)\nconst hash = createHash(\"sha256\")\n\nwhile (true) {\n\tconst buffer = await file.readNextChunk()\n\n\tif (!buffer) break\n\n\thash.update(buffer)\n}\n\nawait file.close()\n\nhash.setEncoding(\"hex\")\nhash.end()\n\nconsole.log(hash.read())\n```\n","readmeFilename":"README.md"}