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

Function parseResponses

packages/rpc/test/RpcSerialization.test.ts:33–36  ·  view source on GitHub ↗
(encoded: string)

Source from the content-addressed store, hash-verified

31})
32
33const parseResponses = (encoded: string) => {
34 const responses = encoded.trim().split("\n").map((response) => JSON.parse(response))
35 return responses.length === 1 && Array.isArray(responses[0]) ? responses[0] : responses
36}
37
38const assertBatchRoundTrip = (parser: RpcSerialization.Parser, frame: string) => {
39 const decoded = parser.decode(frame)

Callers 1

assertBatchRoundTripFunction · 0.85

Calls 3

splitMethod · 0.80
parseMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected