MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / extractData

Function extractData

apps/api/tests/api/auth/auth.routes.test.ts:47–50  ·  view source on GitHub ↗
(body: unknown)

Source from the content-addressed store, hash-verified

45 * on enumeration-safety compare only the payload.
46 */
47const extractData = (body: unknown): unknown =>
48 body !== null && typeof body === "object" && "data" in body
49 ? body.data
50 : body;
51
52const readJson = async (res: Response): Promise<unknown> => {
53 if (!isJson(res)) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected