ran npm run tdd
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
module.exports = cleanObj = (obj, keysToKeep = [], childIndicator) => {
|
||||
const cleanObj = (obj, keysToKeep = [], childIndicator) => {
|
||||
Object.keys(obj).forEach(key => {
|
||||
if (key === childIndicator) {
|
||||
cleanObj(obj[key], keysToKeep, childIndicator);
|
||||
@ -7,4 +7,5 @@ delete obj[key];
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
};
|
||||
};
|
||||
module.exports = cleanObj
|
||||
Reference in New Issue
Block a user