UNPKG

@respeecher/respeecher-js

Version:

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Frespeecher%2Frespeecher-js) [![npm shield](

13 lines (12 loc) 476 B
import { getSchemaUtils } from "../builders/schema-utils/index.mjs"; import { maybeSkipValidation } from "./maybeSkipValidation.mjs"; export function createIdentitySchemaCreator(schemaType, validate) { return () => { const baseSchema = { parse: validate, json: validate, getType: () => schemaType, }; return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema)); }; }