Creates a new array with all falsy and empty values removed.
compact([0, 1, false, 2, '', 3])// [1, 2, 3]
A new array with the filtered values
The array to compact
Generated using TypeDoc
Creates a new array with all falsy and empty values removed.
Example
Returns
A new array with the filtered values