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

Function json

packages/opencode/test/fixture/tui-sdk.ts:7–12  ·  view source on GitHub ↗
(data: unknown, init?: ResponseInit)

Source from the content-addressed store, hash-verified

5export const directory = `${worktree}/packages/opencode`
6
7export function json(data: unknown, init?: ResponseInit) {
8 return new Response(JSON.stringify(data), {
9 ...init,
10 headers: { "content-type": "application/json", ...(init?.headers ?? {}) },
11 })
12}
13
14export function eventSource(): EventSource {
15 return { subscribe: async () => () => {} }

Callers 1

createFetchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected