Function omit

  • The opposite of pick - this method creates an object composed of the own and inherited enumerable property paths of object that are not omitted.

    Example

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

    omit(object, ['a', 'c'])
    // { 'b': '2' }

    omit(object, (x) => isNumber(x))
    // { 'b': '2' }

    Returns

    Returns the new object.

    See

    pick

    Type Parameters

    • T

    Parameters

    • obj: T

      The source object.

    • paths: Iteratee<any, any, any>

      The property paths to omit.

    Returns Partial<T>

  • Type Parameters

    • T

    Parameters

    • obj: T
    • paths: PropertyKey[]

    Returns Partial<T>

Generated using TypeDoc