This commit is contained in:
Angelos Chalaris
2017-12-27 11:02:46 +02:00
parent 37bb271221
commit 3d79413392
45 changed files with 89 additions and 91 deletions

View File

@ -13,9 +13,9 @@ const cleanObj = (obj, keysToKeep = [], childIndicator) => {
} else if (!keysToKeep.includes(key)) {
delete obj[key];
}
 });
 });
return obj;
}
};
/*
const testObj = {a: 1, b: 2, children: {a: 1, b: 2}}
cleanObj(testObj, ["a"],"children") // { a: 1, children : { a: 1}}