Gathering detailed insights and metrics for it-length-prefixed
Gathering detailed insights and metrics for it-length-prefixed
Gathering detailed insights and metrics for it-length-prefixed
Gathering detailed insights and metrics for it-length-prefixed
🏁 Streaming length prefixed buffers with async iterables
npm install it-length-prefixed
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (97.19%)
JavaScript (2.81%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
4 Stars
150 Commits
10 Forks
2 Watchers
6 Branches
3 Contributors
Updated on Feb 13, 2025
Latest Version
10.0.1
Package Id
it-length-prefixed@10.0.1
Unpacked Size
51.12 kB
Size
12.85 kB
File Count
35
NPM Version
10.9.2
Node Version
22.13.1
Published on
Feb 13, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Streaming length prefixed buffers with async iterables
Encode/decode streams of bytes with length-prefixes.
1import { pipe } from 'it-pipe' 2import * as lp from 'it-length-prefixed' 3 4const encoded = [] 5 6// encode 7await pipe( 8 [uint8ArrayFromString('hello world')], 9 (source) => lp.encode(source), 10 async source => { 11 for await (const chunk of source) { 12 encoded.push(chunk.slice()) // (.slice converts Uint8ArrayList to Uint8Array) 13 } 14 } 15) 16 17console.log(encoded) 18// => [Buffer <0b 68 65 6c 6c 6f 20 77 6f 72 6c 64>] 19 20const decoded = [] 21 22// decode 23await pipe( 24 encoded, // e.g. from above 25 (source) => lp.decode(source), 26 async source => { 27 for await (const chunk of source) { 28 decoded.push(chunk.slice()) // (.slice converts Uint8ArrayList to Uint8Array) 29 } 30 } 31) 32 33console.log(decoded) 34// => [Buffer <68 65 6c 6c 6f 20 77 6f 72 6c 64>]
Licensed under either of
Unless 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.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 7/25 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More