Closed caitoor closed 3 years ago
Good idea to combine both!
Still, it would be good to return an object (and not an array of length 1) if an object was passed as the first parameter.
done; the mutated array/object is now returned (or unchanged data if prop type is wrong). Before, the passed data was mutated and not returned.
Would you mind combining deleteProps() and deletePropsInData()? We would only have to check the data type of the first parameter and - in the case of a passed object - convert this object into an array of objects with length 1. We would use deletePropsInData(), which could then be renamed deleteProps().