{"name":"it-length-prefixed","version":"11.0.1","description":"Streaming length prefixed buffers with async iterables","author":{"name":"Alan Shaw"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/alanshaw/it-length-prefixed#readme","repository":{"type":"git","url":"git+https://github.com/alanshaw/it-length-prefixed.git"},"bugs":{"url":"https://github.com/alanshaw/it-length-prefixed/issues"},"publishConfig":{"access":"public","provenance":true},"keywords":["async","iterable","iterator","length-prefixed","length-prefixed-stream","varint"],"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js","module-sync":"./dist/src/index.js"},"./decode":{"types":"./dist/src/decode.d.ts","import":"./dist/src/decode.js","module-sync":"./dist/src/decode.js"},"./encode":{"types":"./dist/src/encode.d.ts","import":"./dist/src/encode.js","module-sync":"./dist/src/encode.js"}},"release":{"branches":["master"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release","docs":"aegir docs"},"dependencies":{"it-reader":"^7.0.0","it-stream-types":"^2.0.1","uint8-varint":"^3.0.0","uint8arraylist":"^3.0.1","uint8arrays":"^6.1.0"},"devDependencies":{"aegir":"^48.0.1","iso-random-stream":"^2.0.0","it-all":"^3.0.0","it-block":"^7.0.0","it-drain":"^3.0.0","it-foreach":"^2.0.0","it-map":"^3.0.0","it-pipe":"^3.0.0","it-pushable":"^3.0.0","p-defer":"^4.0.0","random-int":"^3.0.0"},"gitHead":"6f51b27794ca9703f4f931d731a2ae2079c1dd71","_id":"it-length-prefixed@11.0.1","_nodeVersion":"24.14.1","_npmVersion":"11.14.0","dist":{"integrity":"sha512-0Cy4RHFiL2CH060Lkigq0N37VaPg7oSylG6YjXErq+ccJFYcNEWNzxNjbqceio/sY1C+q84vZXOCE6/C0flYfQ==","shasum":"975759d01edbabc98f7da127ccce03d3fa921429","tarball":"http://registry-npm.ywwl.com/it-length-prefixed/download/it-length-prefixed-11.0.1.tgz","fileCount":35,"unpackedSize":108836,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/it-length-prefixed@11.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEwus9ANY9drcOqNpqeeW2Q42mR0PRDeo1xGAAqF7cWLAiBA2QM+4v06oii8yzT7iwkSWf9OzJ8NobdliUNrqNZQ7A=="}],"size":24741,"noattachment":false,"key":"/it-length-prefixed/-/it-length-prefixed-11.0.1.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0c9549d3-055d-4e4c-ac3f-7a4043e17aa1"}},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/it-length-prefixed_11.0.1_1778231826926_0.9979397230120541"},"_hasShrinkwrap":false,"readme":"# it-length-prefixed\n\n[![codecov](https://img.shields.io/codecov/c/github/alanshaw/it-length-prefixed.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-length-prefixed)\n[![CI](https://img.shields.io/github/actions/workflow/status/alanshaw/it-length-prefixed/js-test-and-release.yml?branch=master\\&style=flat-square)](https://github.com/alanshaw/it-length-prefixed/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)\n\n> Streaming length prefixed buffers with async iterables\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nEncode/decode streams of bytes with length-prefixes.\n\n## Example\n\n```js\nimport { pipe } from 'it-pipe'\nimport * as lp from 'it-length-prefixed'\n\nconst encoded = []\n\n// encode\nawait pipe(\n  [uint8ArrayFromString('hello world')],\n  (source) => lp.encode(source),\n  async source => {\n    for await (const chunk of source) {\n      encoded.push(chunk.slice()) // (.slice converts Uint8ArrayList to Uint8Array)\n    }\n  }\n)\n\nconsole.log(encoded)\n// => [Buffer <0b 68 65 6c 6c 6f 20 77 6f 72 6c 64>]\n\nconst decoded = []\n\n// decode\nawait pipe(\n  encoded, // e.g. from above\n  (source) => lp.decode(source),\n  async source => {\n    for await (const chunk of source) {\n      decoded.push(chunk.slice()) // (.slice converts Uint8ArrayList to Uint8Array)\n    }\n  }\n)\n\nconsole.log(decoded)\n// => [Buffer <68 65 6c 6c 6f 20 77 6f 72 6c 64>]\n```\n\n# API Docs\n\n- <https://alanshaw.github.io/it-length-prefixed>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/alanshaw/it-length-prefixed/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/alanshaw/it-length-prefixed/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1778231827100,"_cnpm_publish_time":1778231827100,"dist-tags":{"latest":"11.0.1"}}