Travis build: 606

This commit is contained in:
Travis CI
2017-12-29 13:39:10 +00:00
parent 978dd4086a
commit 1b4057e30f
3 changed files with 48 additions and 2 deletions

View File

@ -7,10 +7,13 @@ Convert each key in the original object to lowercase, using `String.toLowerCase(
```js
const lowercaseKeys = obj =>
Object.keys(obj).reduce((acc,key) => {acc[key.toLowerCase()] = obj[key]; return acc;},{});
Object.keys(obj).reduce((acc, key) => {
acc[key.toLowerCase()] = obj[key];
return acc;
}, {});
```
```js
const myObj = {Name: 'Adam', sUrnAME: 'Smith'};
const myObj = { Name: 'Adam', sUrnAME: 'Smith' };
const myObjLower = lowercaseKeys(myObj); // {name: 'Adam', surname: 'Smith'};
```