MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / streamByteLength

Function streamByteLength

packages/kaos/test/e2e/exec-edge-cases.test.ts:30–36  ·  view source on GitHub ↗
(stream: NodeJS.ReadableStream)

Source from the content-addressed store, hash-verified

28}
29
30async function streamByteLength(stream: NodeJS.ReadableStream): Promise<number> {
31 let n = 0;
32 for await (const chunk of stream) {
33 n += (chunk as Buffer).length;
34 }
35 return n;
36}
37
38// ── Tests ─────────────────────────────────────────────────────────────
39

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected