Array functions
Functions related to arrays
- Source:
array.utils.ts
removeFromArray(item, array)
Remove an item from an array
Type parameters
<ItemType>
Parameters
- item - Item to remove from the array
- Type:
ItemType
- Type:
- array
- Type:
ItemType[]
- Type:
randomFromArray(array)
Get a random item from an array
Type parameters
<ItemType>
Parameters
- array
- Type:
ItemType[]
- Type:
Returns
- Type:
ItemType
removeDuplicatesFromArray(array)
Removes all duplicate items from an array and returns the array
Type parameters
<ItemType>
Parameters
- array
- Type:
ItemType[]
- Type:
Returns
- Type:
ItemType[]