Namespaces
Methods
(inner) chunkArray(array, size) → {Array}
Split an array into smaller array (chunks)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
array |
Array
|
list of elements |
size |
Number
|
integer defining the number of elements in each chunk |
Returns:
- Type:
-
Array
array containing the generated chunks
(inner) falsyBounce(array) → {Array}
Returns an array stripped of al falsy values
- Source:
Parameters:
Name | Type | Description |
---|---|---|
array |
Array
|
Returns:
- Type:
-
Array
array containing no falsy values
(inner) getElementAt(iterable, n) → {any}
Get element of an iterable
- Source:
Parameters:
Name | Type | Description |
---|---|---|
iterable |
Array
|
|
n |
Number
|
Returns:
- Type:
-
any
(inner) intersection(arr1, arr2) → {Array}
Check if some element of array 1 intersect array 2
- Source:
Parameters:
Name | Type | Description |
---|---|---|
arr1 |
Array
|
array to check for intersection |
arr2 |
Array
|
array to check for intersection |
Returns:
- Type:
-
Array
intersecting elements
(inner) mergeArrays(…arrays) → {function}
Merge arrays in a single array
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arrays |
Arrays
|
<repeatable> |
arrays to merge |
Returns:
- Type:
-
function
function that take a boolean as entry
(inner) randomPick(array) → {any}
Return a random element from the input array
- Source:
Parameters:
Name | Type | Description |
---|---|---|
array |
Array
|
Returns:
- Type:
-
any
random element from array