API - Inflector

Inflector class to allow REST

Methods

Function to make the first letter of a sentence capital

Parameters
Name Type Description
word String Word to capitalize

Returns String: Capitalized word

isPlural method will check if the word is plural or not. If the work is plural it returns true, else false is returned

Parameters
Name Type Description
word String The word to check

Returns Boolean: True or false.

isSingular method will check if the word is singular or not. If the work is singular it returns true, else false is returned

Parameters
Name Type Description
word String The word to check

Returns Boolean: True or false.

pluralize method will make a plural from a singular word when the word is plural it will do nothing

Parameters
Name Type Description
word String Word to pluralize

Returns String: Plural word

singularize method will make a singular of a plural word If the word is singular it will do nothing.

Parameters
Name Type Description
word String Word to singularize

Returns String: Singular word