Noun(noun, options)

Represents a noun.

new Noun(noun, options)

Creates a noun. Options:
  • shouldEndInIe - Whether, if the plural ends in 'ies', the singular should end in 'y' oi 'ie'
Parameters:
Name Type Description
noun The noun.
options The options.

Extends

Members

options

For the toObject() method

Methods

getPlural() → {Noun}

Returns the plural if noun is plural, or itself otherwise
Returns:
Noun - The noun in plural

getSingular() → {Noun}

Returns the singular if noun is plural, or itself otherwise
Returns:
Noun - The noun in singular

toObject() → {object}

Returns an object representation of the class.
Returns:
object
Inherited From:

toString()

Requi red toString() method
Returns:
- string The item defined in the constructor.
Inherited From: