Options
All
  • Public
  • Public/Protected
  • All
Menu

Module pickBy

Index

References

Functions Object

References

Renames and re-exports __type

Object Functions

  • pickBy(object: any, predicate: (value: any) => boolean): any
  • Creates an object composed of the object properties predicate returns truthy for. The predicate is invoked with two arguments: (value, key).

    since

    5.7.0

    example
    const object = { 'a': 1, 'b': '2', 'c': 3 }

    pickBy(object, isNumber)
    // => { 'a': 1, 'c': 3 }

    Parameters

    • object: any

      The source object.

    • predicate: (value: any) => boolean

      The function invoked per property.

        • (value: any): boolean
        • Parameters

          • value: any

          Returns boolean

    Returns any

    Returns the new object.