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

Function readJson

scripts/smoke-compatible-shell.mjs:135–142  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

133}
134
135async function readJson(req) {
136 const chunks = []
137 for await (const chunk of req) {
138 chunks.push(chunk)
139 }
140 const text = Buffer.concat(chunks).toString('utf8')
141 return text ? JSON.parse(text) : {}
142}
143
144async function getFreePort() {
145 const server = http.createServer()

Callers 1

mainFunction · 0.70

Calls 2

pushMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected