@absolunet/ioc2.1.0

View on GitHub

Enum

Base enum class that emulate the TypeScript enum feature, but by using an instantiable and injectable class instead of a plain object.

Methods

get(search)

Source:
Get value by key.
Parameters:
Name Type Description
search string The searched key.
Returns:
The retrieved value.
Type
*

getKey(search)

Source:
Get key by value.
Parameters:
Name Type Description
search * The searched value.
Returns:
The retrieved key.
Type
string | null

keys()

Source:
Get enumeration keys.
Returns:
The enumeration keys.
Type
Array.<string>

values()

Source:
Get enumeration values.
Returns:
The enumeration values.
Type
Array.<*>

entries()

Source:
Get enumeration entries.
Returns:
The enumeration entries.
Type
Array.<Array.<*>>