Module

x/lodash_es/src/array.js>compact

lodash for deno use
Latest
function compact
import { compact } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/array.js";

Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey.

Examples

_.compact([0, 1, false, 2, '', 3]); // => [1, 2, 3]

Parameters

array

The array to compact.