Tweakr
    Preparing search index...

    Function pickBy

    • Creates a new object composed of the properties that satisfy the predicate function.

      Type Parameters

      • T extends object

      Parameters

      • obj: T

        Source object

      • predicate: (value: T[keyof T], key: keyof T) => boolean

        Function invoked per property

      Returns Partial<T>

      A new object with filtered properties

      pickBy({ a: 1, b: '2', c: 3 }, val => typeof val === 'number');
      // => { a: 1, c: 3 }

      1.2.0