Function objOmitKeys

  • Deletes specified keys from an object. This function takes an object and an array of keys to be deleted from the object. It returns a new object with the specified keys removed.

    Type Parameters

    Parameters

    • obj: O

      The object from which keys are to be deleted.

    • Rest ...keys: ObjectKey[]

      The keys to be deleted from the object.

    Returns Partial<O>

    A new object with the specified keys deleted.

    Example

    const obj = { a: 1, b: 2, c: 3 };
    objOmitKeys(obj, 'a', 'c');
    //=> { b: 2 }

Generated using TypeDoc