MCPcopy Create free account
hub / github.com/better-auth/examples / getObjectFormSchema

Function getObjectFormSchema

nuxt-example/components/ui/auto-form/utils.ts:85–93  ·  view source on GitHub ↗
(
	schema: ZodObjectOrWrapped,
)

Source from the content-addressed store, hash-verified

83}
84
85export function getObjectFormSchema(
86 schema: ZodObjectOrWrapped,
87): z.ZodObject<any, any> {
88 if (schema?._def.typeName === "ZodEffects") {
89 const typedSchema = schema as z.ZodEffects<z.ZodObject<any, any>>;
90 return getObjectFormSchema(typedSchema._def.schema);
91 }
92 return schema as z.ZodObject<any, any>;
93}
94
95function isIndex(value: unknown): value is number {
96 return Number(value) >= 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected