MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / isZodSchema

Function isZodSchema

packages/components/src/utils.ts:2321–2322  ·  view source on GitHub ↗
(schema: unknown)

Source from the content-addressed store, hash-verified

2319 * whichever Zod major version (`^3 || ^4`) TypeScript resolves at the call site.
2320 */
2321export const isZodSchema = (schema: unknown): schema is ZodToJsonSchemaInput =>
2322 typeof schema === 'object' && schema !== null && '_def' in schema && typeof (schema as { parse?: unknown }).parse === 'function'
2323
2324/**
2325 * Normalizes a tool schema into a plain JSON Schema object.

Callers 1

toolSchemaToJsonSchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected