Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/object/omitBy

Index

Functions

Functions

Const omitBy

  • omitBy<T>(object: T, predicate: (v: any, k: string) => boolean): Partial<T>
  • omitBy - this method creates an object composed of the own and inherited enumerable string keyed properties of object that predicate doesn't return truthy for.

    example

    omitBy({ 'a': 1, 'b': '2', 'c': 3 }, (v,k) => typeof v === 'number'); // returns { 'b': '2' }

    Type parameters

    • T: Record<string, any>

    Parameters

    • object: T
    • predicate: (v: any, k: string) => boolean
        • (v: any, k: string): boolean
        • Parameters

          • v: any
          • k: string

          Returns boolean

    Returns Partial<T>

    {Partial}

Generated using TypeDoc