xdash / compact
Function: compact()
compact<
T
>(arr
):T
[]
Compacts an array by removing null and undefined values.
Type parameters
• T
Parameters
• arr: (undefined
| null
| false
| 0
| T
)[]
array to compact
Returns
T
[]
the compacted array