Methods
chunk(array:, sizeopt)
Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
array: |
array | The array to process | ||
size |
number |
<optional> |
1 | size: The length of each chunk |
compact(array)
Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey.
Parameters:
Name | Type | Description |
---|---|---|
array |
- Source:
contact(array, …values)
Creates a new array concatenating array with any additional arrays and/or values.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
array |
* | The array to concatenate. | |
values |
any |
<repeatable> |
The values to concatenate. |