Travis build: 1611

This commit is contained in:
30secondsofcode
2019-12-09 10:56:20 +00:00
parent 2c830d8a6f
commit b26bc18ec3
15 changed files with 875 additions and 873 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