MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / parseJsonObject

Function parseJsonObject

tools/model-gateway/server.mjs:689–700  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

687}
688
689function parseJsonObject(input) {
690 if (!input || typeof input !== 'string') {
691 return {}
692 }
693 try {
694 return JSON.parse(input)
695 } catch {
696 return {
697 raw: input,
698 }
699 }
700}
701
702function buildUpstreamHeaders(config) {
703 const headers = {

Callers 2

handleStreamFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected