Creates a new object with the specified keys removed.
The original object to omit keys from.
An array of keys to omit from the original object.
A new object with the specified keys omitted.
const user = { id: 1, name: 'John', password: '123' };const publicUser = omit(user, ['password']); // { id: 1, name: 'John' } Copy
const user = { id: 1, name: 'John', password: '123' };const publicUser = omit(user, ['password']); // { id: 1, name: 'John' }
Creates a new object with the specified keys removed.