UNPKG

@payfit/unity-components

Version:

9 lines (8 loc) 453 B
import { StandardSchemaAdapter as e } from "../adapters/standardSchemaAdapter.js"; import { ZodV3SchemaAdapter as t, ZodV4SchemaAdapter as n } from "../adapters/zodAdapter.js"; //#region src/utils/createSchemaAdapter.ts function r(r) { return r ? r._def && typeof r._def == "object" ? "def" in r ? new n(r) : new t(r) : r["~validate"] && typeof r["~validate"] == "function" ? new e(r) : null : null; } //#endregion export { r as createSchemaAdapter };