Pluralizes a given string based on the provided amount. Automatically handles dropping the trailing 'y' for 'ies' endings.
The number that determines whether to pluralize the string.
The string to pluralize.
The type of pluralization to apply (default is "s").
The pluralized string if amount is not 1, otherwise returns the original string.
pluralize(1, "cat") // "cat"pluralize(2, "cat") // "cats" Copy
pluralize(1, "cat") // "cat"pluralize(2, "cat") // "cats"
Pluralizes a given string based on the provided amount. Automatically handles dropping the trailing 'y' for 'ies' endings.