MCPcopy Index your code
hub / github.com/anomalyco/opencode / parseJSON

Function parseJSON

packages/opencode/src/session/retry.ts:165–174  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

163}
164
165function parseJSON(value: unknown) {
166 return iife(() => {
167 try {
168 if (typeof value !== "string") return undefined
169 return JSON.parse(value)
170 } catch {
171 return undefined
172 }
173 })
174}
175
176export function policy(opts: {
177 provider: string

Callers 1

retryableFunction · 0.85

Calls 1

iifeFunction · 0.90

Tested by

no test coverage detected