• The opposite of _.pick; this method creates an object composed of the own and inherited enumerable properties of object that are not omitted.

    Type Parameters

    • T extends object
    • K extends PropertyName[]

    Parameters

    • object: undefined | null | T

      The source object.

    • Optional Rest...paths: K

      The property names to omit, specified individually or in arrays..

    Returns Pick<T, Exclude<keyof T, K[number]>>

    Returns the new object.

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

    _.omit(object, ['a', 'c']);
    // => { 'b': '2' }
  • Type Parameters

    • T extends object
    • K extends string | number | symbol

    Parameters

    • object: undefined | null | T
    • Rest...paths: Many<K>[]

    Returns Omit<T, K>

    _.omit

  • Type Parameters

    • T extends object

    Parameters

    • object: undefined | null | T
    • Rest...paths: Many<PropertyName>[]

    Returns Partial<T>

    _.omit