import { setSchema } from "./any" import { cleanString, StringSchema } from "./string" export type UuidSchema = Omit, "regexp"> export function cleanUuid(schema: UuidSchema = {}) { const cleaner = cleanString({ ...schema, regexp: /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/, }) return setSchema(cleaner, schema) }