MCPcopy
hub / github.com/infinitered/reactotron / parseSSE

Function parseSSE

lib/reactotron-mcp/test/mcp-server.test.ts:39–43  ·  view source on GitHub ↗
(body: string)

Source from the content-addressed store, hash-verified

37
38// Helper: parse SSE response to get the JSON-RPC result
39function parseSSE(body: string): any {
40 const dataLine = body.split("\n").find((l) => l.startsWith("data: "))
41 if (!dataLine) return null
42 return JSON.parse(dataLine.replace("data: ", ""))
43}
44
45// Helper: connect a mock app to the relay
46function connectMockApp(

Callers 1

mcp-server.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected