• ES Version of lodash.compact Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey.

    Type Parameters

    • T

    Parameters

    • arr: T[]

      The array to compact.

    Returns T[]

    Returns the new array of filtered values.