MCPcopy Create free account
hub / github.com/Effect-TS/effect / failMaxBufferSize

Function failMaxBufferSize

packages/effect/src/unstable/rpc/RpcSerialization.ts:125–128  ·  view source on GitHub ↗
(maxBufferSize: number)

Source from the content-addressed store, hash-verified

123 const decoder = new TextDecoder()
124 let buffer = ""
125 const failMaxBufferSize = (maxBufferSize: number): never => {
126 buffer = ""
127 throw new MaxBufferSizeExceeded({ maxBufferSize })
128 }
129 return ({
130 decode: (bytes) => {
131 buffer += typeof bytes === "string" ? bytes : decoder.decode(bytes, { stream: true })

Callers 2

makeNdjsonFunction · 0.85
decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected