Travis build: 1880

This commit is contained in:
30secondsofcode
2020-04-16 12:14:30 +00:00
parent 8530d4a46e
commit adbf8cfe1f
14 changed files with 97 additions and 104 deletions

View File

@ -14,13 +14,13 @@ const deepMapKeys = (obj, f) =>
Array.isArray(obj)
? obj.map(val => deepMapKeys(val, f))
: typeof obj === 'object'
? Object.keys(obj).reduce((acc, current) => {
? Object.keys(obj).reduce((acc, current) => {
const val = obj[current];
acc[f(current)] =
val !== null && typeof val === 'object' ? deepMapKeys(val, f) : (acc[f(current)] = val);
return acc;
}, {})
: obj;
: obj;
```
```js