MCPcopy Create free account
hub / github.com/anomalyco/opencode / jsonOrText

Function jsonOrText

packages/http-recorder/src/websocket.ts:51–51  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

49 event.kind === "text" ? event.body : new Uint8Array(Buffer.from(event.body, "base64"))
50
51const jsonOrText = (value: string) => Option.match(decodeJson(value), { onNone: () => value, onSome: canonicalizeJson })
52
53const assertClientEvent = (actual: string, expected: WebSocketEvent | undefined, index: number, asJson: boolean) =>
54 Effect.sync(() => {

Callers 1

assertClientEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected