Linting
This commit is contained in:
@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user