import { Arrays } from "https://deno.land/x/arrays@v1.0.21/mod.ts";
const { compact } = Arrays;
Returns an array with all falsey values (false, null, 0, '', undefined, and NaN) removed.
import 'https://deno.land/x/arrays/mod.ts'
const arr = [1, 2, 3, 4, NaN, 5, null, 6]
const compactArr = arr.compact()
// => [1, 2, 3, 4, 5, 6]