Skip to main content
variable compact
import { compact } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Removes falsy values from an array. Use Array.prototype.filter() to filter out falsy values (false, null, 0, "", undefined, and NaN).

type

(arr: any[]) => unknown