API - States

The states object is the handler for all the states.

Methods

This method will try to get a state from the object, when the state isn't found it will return false.

Parameters
Name Type Description
name String The name of the state to find

Returns : The return value of the state

This method will insert a state in the object. these will be used for filtering in the model.

Parameters
Name Type Description
name String The name of the state
filter String The name of the filter to use on the value
defaultValue String The default value of the state
unique Boolean Determines if the state is unique or not

Returns States: The states object used for chaining

This method will check if the specified states are unique if it is it will return true, else false.

Returns Boolean:

This method will set the value of a single state. This will only happen when the state is registred.

Parameters
Name Type Description
name String Name of the state
value * The value the state should get

Returns States: