/** * A name parsed from an email's local part. */ interface NameResult { /** Confidence in the parse: `high` (clear separator), `medium` (camelCase), `low` (heuristic), `none`. */ confidence: "high" | "low" | "medium" | "none"; /** The detected first name, capitalized, if any. */ firstName?: string; /** The detected first + last name joined, if any. */ fullName?: string; /** The detected last name, capitalized, if any. */ lastName?: string; } /** * Heuristically parses a person's name from the local part of an email address. * * Handles separator-delimited (`john.doe`), camelCase (`johnDoe`), and * single-token local parts, stripping trailing digits. This is best-effort name * parsing only — no gender detection — and confidence is reported so callers * can decide how much to trust it. * @param email The email address to parse. * @returns The parsed name and a confidence level. * @example * ```ts * import { parseName } from "@visulima/email-verifier/enrich/name"; * * parseName("john.doe@example.com"); * // { firstName: "John", lastName: "Doe", fullName: "John Doe", confidence: "high" } * ``` */ declare const parseName: (email: string) => NameResult; export { type NameResult, parseName as default, parseName };