Returns a new object excluding the specified keys.
The source object.
An array of keys to omit from the object.
A new object without the specified keys.
const obj = { a: 1, b: 2, c: 3 };const result = omit(obj, ["b", "c"]);console.log(result); // { a: 1 } Copy
const obj = { a: 1, b: 2, c: 3 };const result = omit(obj, ["b", "c"]);console.log(result); // { a: 1 }
1.1.0
Returns a new object excluding the specified keys.