Returns the singular form of a plural word.
function toSingular( word: string): stringstringReturns the singular form of a plural word.
stringstringReturns the singular form of a plural word.
Handles common English pluralization patterns such as:
Preserves the casing of the original input, including acronyms or title case.
toSingular("cities"); // "city"
toSingular("boxes"); // "box"
toSingular("children"); // "child"
toSingular("teeth"); // "tooth"
toSingular("dogs"); // "dog"
toSingular("BUZZES"); // "BUZZ"
toSingular("IDs"); // "ID"
