Tweakr
    Preparing search index...

    Function compactBy

    • Removes elements from array where iteratee returns falsy.

      Type Parameters

      • T

      Parameters

      • array: T[]

        Input array

      • iteratee: (v: T) => any

        Function to determine removal

      Returns T[]

      Filtered array

      compactBy([{x:1},{x:0},{x:2}], o => o.x); // [{x:1},{x:2}]
      

      1.2.0