@absolunet/ioc2.1.0

View on GitHub

StringHelper

String helper.

Methods

plural(stringopt, quantityopt)

Source:
Convert to plural version of the string.
Parameters:
Name Type Attributes Default Description
string string <optional>
The word to pluralize.
quantity number <optional>
2 How many of the word exist.
Returns:
The pluralized word.
Type
string

singular(string)

Source:
Convert to singular version of the string.
Parameters:
Name Type Description
string string The word to singularize.
Returns:
The singularized word.
Type
string

getForward()

Source:
Get to-case package for forward calls.
Returns:
The to-case package.
Type
ToCase