MCPcopy Index your code
hub / github.com/oakserver/oak / jsonBodyReplacer

Function jsonBodyReplacer

application.test.ts:1054–1060  ·  view source on GitHub ↗
(_, value, ctx)

Source from the content-addressed store, hash-verified

1052 let called = 0;
1053 const app = new Application({
1054 jsonBodyReplacer(_, value, ctx) {
1055 assert(ctx);
1056 called++;
1057 return typeof value === "bigint"
1058 ? { __bigint: value.toString(10) }
1059 : value;
1060 },
1061 });
1062 app.use(async (ctx) => {
1063 ctx.response.body = { a: 123456n };

Callers

nothing calls this directly

Calls 1

assertFunction · 0.90

Tested by

no test coverage detected