Filters an array IN PLACE, as opposed to returning a new array.
The array to filter, it will be mutated.
The filter function, return true on elements to keep.
Checks if an array is empty, and notifies TypeScript that it is if so.
The array to check if is empty.
True if empty, false otherwise.
Creates a 2D array (array of arrays).
The width of the [first] array.
The height of the [second] arrays in the first.
An optional default value to fill in each element in all arrays with.
A 2D array, all fill in with the default value.
Creates a 2D array (array of arrays).
The width of the [first] array.
The height of the [second] arrays in the first.
A 2D array, all fill in with undefined.
Removes a matching element from the array, if present.
The element to remove from arrays.
The array(s) you want to try to the element from.
The number of arrays this element was removed from.
Removes a matching element from the array, if present.
The array to attempt to remove an element from.
The element(s) you want to try to remove from the array.
The number of elements removed.
Shuffles this array randomly IN PLACE.
The array to shuffle IN PLACE.
A callback that is a random number generator, must generate numbers [0, 1).
Returns a newly sorted array of the passed in array. The passed in array is not changed.
The array to form a sorted one from.
An optional callback to get the value from each item to compare against.
A new array that is the sorted form of the passed in array.
Generated using TypeDoc
Utility functions for array.