Methods
-
ancestors(first, second) → {Array}
-
Finds the common ancestor path between two states.
Parameters:
Name Type Description firstObject The first state.
secondObject The second state.
Returns:
Returns an array of state names in descending order, not including the root.
- Type
- Array
-
arraySearch(array, value) → {Number}
-
IE8-safe wrapper for
Array.prototype.indexOf().Parameters:
Name Type Description arrayArray A JavaScript array.
value* A value to search the array for.
Returns:
Returns the array index value of
value, or-1if not present.- Type
- Number
-
equalForKeys(a, b, keys) → {Boolean}
-
Performs a non-strict comparison of the subset of two objects, defined by a list of keys.
Parameters:
Name Type Description aObject The first object.
bObject The second object.
keysArray The list of keys within each object to compare. If the list is empty or not specified, it defaults to the list of keys in
a.Returns:
Returns
trueif the keys match, otherwisefalse.- Type
- Boolean
-
filterByKeys(keys, values) → {Boolean}
-
Returns the subset of an object, based on a list of keys.
Parameters:
Name Type Description keysArray valuesObject Returns:
Returns a subset of
values.- Type
- Boolean
-
inheritParams(currentParams, newParams, $current, $to)
-
Merges a set of parameters with all parameters inherited between the common parents of the current state and a given destination state.
Parameters:
Name Type Description currentParamsObject The value of the current state parameters ($stateParams).
newParamsObject The set of parameters which will be composited with inherited params.
$currentObject Internal definition of object representing the current state.
$toObject Internal definition of object representing state to transition to.
-
keys(object) → {Array}
-
IE8-safe wrapper for
Object.keys().Parameters:
Name Type Description objectObject A JavaScript object.
Returns:
Returns the keys of the object as an array.
- Type
- Array
-
normalize(keys, values) → {Object}
-
Normalizes a set of values to string or
null, filtering them by a list of keys.Parameters:
Name Type Description keysArray The list of keys to normalize/return.
valuesObject An object hash of values to normalize.
Returns:
Returns an object hash of normalized string values.
- Type
- Object