Export the utilities methods about Arrays
- License:
- Source:
Methods
-
<static> sortBy(propertyName, ascending)
-
Parameters:
Name Type Description propertyName
string ascending
ordering - Source:
Returns:
- Type
- function
-
<static> toArray(object [, options])
-
Will wrap the object value in an array, if is not already one, and return empty array in case where input object is null or undefined. This function is build to ensure the return value will be always an array
Parameters:
Name Type Argument Description object
* The target to return as array options
object <optional>
Properties
Name Type Argument Default Description keepArray
boolean <optional>
false If true, will wrap array too instead of returning it keepNull
boolean <optional>
false If true, will wrap null or undefined value too instead of returning empty array - Source:
Returns:
- Type
- Array.<*>