Skip to content

omit

omit<T>(params): Record<string, unknown>

Defined in: objects/omit/index.ts:55

Creates an object with the specified keys removed.

T extends Record<string, unknown>

OmitParams<T>

The parameters object

Record<string, unknown>

A new object without the specified keys

omit({ obj: { a: 1, b: 2, c: 3 }, keys: ["b", "c"] });
// => { a: 1 }

exclude keys, remove properties, without keys, strip fields

Error if obj is not an object

Error if keys is not an array