const PLURAL_SPECIAL_CASES: Record = { child: "children", person: "people", mouse: "mice", foot: "feet", tooth: "teeth", goose: "geese", man: "men", woman: "women", ox: "oxen", leaf: "leaves", knife: "knives", life: "lives", elf: "elves", loaf: "loaves", potato: "potatoes", tomato: "tomatoes", cactus: "cacti", focus: "foci", analysis: "analyses", basis: "bases", crisis: "crises", thesis: "theses", }; export const pluralize = (word: string, count: number): string => { if (count === 1) { return word; } const lowerWord = word.toLowerCase(); return PLURAL_SPECIAL_CASES[lowerWord] ?? `${word}s`; };