MCPcopy Index your code
hub / github.com/simstudioai/sim / readStream

Function readStream

apps/sim/lib/core/utils/multipart.test.ts:56–60  ·  view source on GitHub ↗
(stream: Readable)

Source from the content-addressed store, hash-verified

54}
55
56async function readStream(stream: Readable): Promise<string> {
57 const chunks: Buffer[] = []
58 for await (const chunk of stream) chunks.push(Buffer.from(chunk))
59 return Buffer.concat(chunks).toString('utf8')
60}
61
62function expectCode(error: unknown, code: MultipartError['code']) {
63 expect(isMultipartError(error)).toBe(true)

Callers 1

multipart.test.tsFile · 0.85

Calls 3

concatMethod · 0.80
pushMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected