@eristack/person
Version:
Structured person name and gender identity — normalize and display, not HRIS
23 lines (22 loc) • 561 B
JavaScript
import {
GENDER_IDENTITIES,
normalizePerson
} from "../chunk-VIQUY5Y7.js";
// src/zod/schemas.ts
import { z } from "zod";
var personNameSchema = z.object({
given: z.string(),
family: z.string(),
middle: z.string().optional(),
prefix: z.string().optional(),
suffix: z.string().optional()
});
var personSchema = z.object({
name: personNameSchema,
gender: z.enum([...GENDER_IDENTITIES]).optional(),
genderOther: z.string().optional()
}).transform((value) => normalizePerson(value));
export {
personSchema
};
//# sourceMappingURL=index.js.map