Travis build: 1953 [cron]

This commit is contained in:
30secondsofcode
2018-04-12 20:52:50 +00:00
parent 07fc5cd355
commit b6b0e391f7
6 changed files with 108 additions and 351 deletions

View File

@ -1,7 +1,9 @@
const renameKeys = (keysMap, obj) => Object
.keys(obj)
.reduce((acc, key) => ({
const renameKeys = (keysMap, obj) =>
Object.keys(obj).reduce(
(acc, key) => ({
...acc,
...{ [keysMap[key] || key]: obj[key] }
}), {});
module.exports = renameKeys;
}),
{}
);
module.exports = renameKeys;