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

Function headersRecord

packages/http-recorder/src/websocket.ts:35–40  ·  view source on GitHub ↗
(headers: Headers.Headers)

Source from the content-addressed store, hash-verified

33}
34
35const headersRecord = (headers: Headers.Headers): Record<string, string> =>
36 Object.fromEntries(
37 Object.entries(headers as Record<string, unknown>).filter(
38 (entry): entry is [string, string] => typeof entry[1] === "string",
39 ),
40 )
41
42const textEvent = (direction: "client" | "server", body: string): WebSocketEvent => ({
43 direction,

Callers 1

openSnapshotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected