MCPcopy Create free account
hub / github.com/oakserver/oak / jsonBodyReviver

Function jsonBodyReviver

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

Source from the content-addressed store, hash-verified

1009 let called = 0;
1010 const app = new Application({
1011 jsonBodyReviver(_, value, ctx) {
1012 assert(ctx);
1013 called++;
1014 if (isBigInitValue(value)) {
1015 return BigInt(value.__bigint);
1016 } else {
1017 return value;
1018 }
1019 },
1020 });
1021 app.use(async (ctx) => {
1022 const body = ctx.request.body;

Callers

nothing calls this directly

Calls 2

assertFunction · 0.90
isBigInitValueFunction · 0.85

Tested by

no test coverage detected