{"name":"it-length-prefixed","version":"10.0.2","keywords":["async","iterable","iterator","length-prefixed","length-prefixed-stream","varint"],"author":{"name":"Alan Shaw"},"license":"Apache-2.0 OR MIT","_id":"it-length-prefixed@10.0.2","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"alanshaw","email":"alan138@gmail.com"}],"homepage":"https://github.com/alanshaw/it-length-prefixed#readme","bugs":{"url":"https://github.com/alanshaw/it-length-prefixed/issues"},"dist":{"shasum":"6ee3c857053e45d36d24cc3b14daf5812915ca61","tarball":"http://registry-npm.ywwl.com/it-length-prefixed/download/it-length-prefixed-10.0.2.tgz","fileCount":35,"integrity":"sha512-RrNBs4d7baK8AKGHleC55l/JtvzxDw6DPXs3CvFgQwdwFzLBFDvlpKgDDNDFwXJjPSy1nEX1A44nL110+EKc3g==","signatures":[{"sig":"MEYCIQCey3BbG8xXH7nIc8Ty3RvHvHYBK9e6VUKf1SttJj4huAIhAKfoOrN05KuLVU8u0dhg63zLtrWqdhldjcuprLj9Et66","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/it-length-prefixed@10.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":105894,"size":24316,"noattachment":false,"key":"/it-length-prefixed/-/it-length-prefixed-10.0.2.tgz"},"type":"module","types":"./dist/src/index.d.ts","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"}},"gitHead":"ed538584cc8b512df92af681b6d2342553cd8af1","release":{"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"release":"major","breaking":true},{"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"]}]],"branches":["master"]},"scripts":{"docs":"aegir docs","lint":"aegir lint","test":"aegir test","build":"aegir build","clean":"aegir clean","release":"aegir release","dep-check":"aegir dep-check","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:electron-main":"aegir test -t electron-main","test:chrome-webworker":"aegir test -t webworker","test:firefox-webworker":"aegir test -t webworker -- --browser firefox"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0c9549d3-055d-4e4c-ac3f-7a4043e17aa1"}},"repository":{"url":"git+https://github.com/alanshaw/it-length-prefixed.git","type":"git"},"_npmVersion":"11.14.0","description":"Streaming length prefixed buffers with async iterables","directories":{},"_nodeVersion":"24.14.1","dependencies":{"it-reader":"^6.0.1","uint8arrays":"^5.0.1","uint8-varint":"^2.0.1","uint8arraylist":"^2.0.0","it-stream-types":"^2.0.1"},"publishConfig":{"access":"public","provenance":true},"typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^48.0.1","it-all":"^3.0.0","it-map":"^3.0.0","it-pipe":"^3.0.0","p-defer":"^4.0.0","it-block":"^6.0.0","it-drain":"^3.0.0","it-foreach":"^2.0.0","random-int":"^3.0.0","it-pushable":"^3.0.0","iso-random-stream":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/it-length-prefixed_10.0.2_1778160054942_0.10288695299070483","host":"s3://npm-registry-packages-npm-production"},"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":1778160055107,"_cnpm_publish_time":1778160055107,"dist-tags":{"latest":"11.0.1"}}