Module with synchronous array functions making life easier
- Source:
- Tutorials:
Methods
(inner) addArray(array1, array2) → {Array}
Adds array 2 to the end of array 1
Parameters:
Name | Type | Description |
---|---|---|
array1 |
Array | |
array2 |
Array |
- Source:
Returns:
- Type
- Array
(inner) addItem(array, item) → {Array}
Adds item to array
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | |
item |
* |
- Source:
Returns:
- Type
- Array
(inner) pluck(array, key) → {Array}
Gets single property from array of objects
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | array of objects |
key |
string | object property name |
- Source:
Returns:
- Type
- Array
(inner) plucksub(array, key, subkey) → {Array}
Gets single subobject property from array of objects
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | array of objects |
key |
string | object property name |
subkey |
string | object property name |
- Source:
Returns:
- Type
- Array