Package Exports
- omit-deep-2
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (omit-deep-2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
omit-deep-2
Omit object values recursively by key / keys / predicate
Installation
npm install --save omit-deep-2
Usage
// For purposes of this example, assume that this object
// is reinitialized before each omitDeep call
var obj = {
a: 1,
b: 2,
c: {
d: 3,
e: 4
}
};
// With key
omitDeep(obj, 'a');
// returns { b: 2, c: { d: 3, e: 4 } }
// With multiple keys
omitDeep(obj, ['a', 'b'], ['d'], 'e');
// returns { c: {} }
// Recursively
omitDeep(obj, 'a', 'd');
// returns { b: 2, c: { e: 4 } }
// With predicate function
omitDeep(obj, (key, val) => typeof val === 'object' || key === 'b');
// returns { a: 1 }