omit
omit(source, propsToOmit)
Omit properties from an object.
var omit = require("can-util/js/omit/omit");
var obj = { a: 1, b: 2, c: 3, d: 4};
var newObj = omit(obj, [ 'b', 'd' ]);
console.log(newObj); // -> { a: 1, c: 3 }
Parameters
- source
{Object}
:The source object whose non-omitted properties will be uses to source the result.
- propsToOmit
{Array}
:List of properties to omit from the result.
Returns
{Object}
:
Returns a new object with all of the properties from source
that were not omitted.