omit source npm
_.omit(object, [props])
The opposite of _.pick
; this method creates an object composed of the
own and inherited enumerable properties of object
that are not omitted.
Arguments
- object (Object)
The source object.
- [props] (...(string|string[])
The property names to omit, specified individually or in arrays..
Returns (Object)
Returns the new object.
Example
var object = { 'user': 'fred', 'age': 40 };
_.omit(object, 'user');
// => { 'age': 40 }