• Omits the key-value pairs corresponding to the given keys from an object; or Creates an object composed of the properties the given function returns falsey for. The function is invoked with two arguments: (value, key)

    Example

    omit({ a: 1, b: '2', c: 3 }, ['b']); // { a: 1, c: 3 }
    

    Example

    omit({ a: 1, b: '2', c: 3 }, (x) => typeof x === 'number'); // { b: '2' }
    

    Parameters

    • obj: Record<string, unknown>
    • arr: string[] | ((value: unknown, key: string, object: Record<string, unknown>) => unknown)

    Returns Record<string, unknown>

Generated using TypeDoc