MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / parseJsonOrText

Function parseJsonOrText

src/services/api/openaiCompatibleClient.ts:440–447  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

438}
439
440function parseJsonOrText(text: string): unknown {
441 if (!text) return undefined
442 try {
443 return JSON.parse(text)
444 } catch {
445 return { message: text }
446 }
447}
448
449async function* parseServerSentEvents(response: Response) {
450 const body = response.body

Callers 1

createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected