Codacy style changes for test files
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
const invertKeyValues = (obj, fn) =>
|
||||
Object.keys(obj).reduce((acc, key) => {
|
||||
const val = fn ? fn(obj[key]) : obj[key];
|
||||
acc[val] = acc[val] || [];
|
||||
acc[val].push(key);
|
||||
return acc;
|
||||
}, {});
|
||||
Object.keys(obj).reduce((acc, key) => {
|
||||
const val = fn ? fn(obj[key]) : obj[key];
|
||||
acc[val] = acc[val] || [];
|
||||
acc[val].push(key);
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
module.exports = invertKeyValues;
|
||||
Reference in New Issue
Block a user