MCPcopy Create free account
hub / github.com/EvoMap/evolver / jsonResponse

Function jsonResponse

test/proxyHubFetchRouting.test.js:6–13  ·  view source on GitHub ↗
(body, status = 200)

Source from the content-addressed store, hash-verified

4const assert = require('node:assert/strict');
5
6function jsonResponse(body, status = 200) {
7 return {
8 ok: status >= 200 && status < 300,
9 status,
10 json: async () => body,
11 text: async () => JSON.stringify(body),
12 };
13}
14
15function loadProxyWithHubFetch(hubFetchImpl) {
16 const hubFetchPath = require.resolve('../src/gep/hubFetch');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected