MCPcopy Create free account
hub / github.com/agentrpc/agentrpc / buildZodObject

Function buildZodObject

sdk-node/src/bin.ts:106–115  ·  view source on GitHub ↗
(schema: any)

Source from the content-addressed store, hash-verified

104
105// @eslint-disable-next-line
106const buildZodObject = (schema: any): ZodRawShape => {
107 const result: Record<string, ZodTypeAny> = {};
108
109 for (const [k, v] of Object.entries(schema.properties)) {
110 // @eslint-disable-next-line
111 result[k] = buildZodProp(v, k);
112 }
113
114 return result;
115};
116
117// @eslint-disable-next-line
118const buildZodProp = (prop: any, key: string): ZodTypeAny => {

Callers 2

mainFunction · 0.85
buildZodPropFunction · 0.85

Calls 1

buildZodPropFunction · 0.85

Tested by

no test coverage detected