change code style in reduce
This commit is contained in:
parent
57c031c1c6
commit
ca79fc98f5
|
@ -263,9 +263,9 @@ export const normalizeTextarea = text => text && text.replace(/[;, ]/g, '\n').sp
|
||||||
|
|
||||||
export const normalizeTopClients = clients => clients.reduce((accumulator, clientObj) => {
|
export const normalizeTopClients = clients => clients.reduce((accumulator, clientObj) => {
|
||||||
const { name, count } = clientObj;
|
const { name, count } = clientObj;
|
||||||
const idToCountMap = accumulator;
|
// eslint-disable-next-line no-param-reassign
|
||||||
idToCountMap[name] = count;
|
accumulator[name] = count;
|
||||||
return idToCountMap;
|
return accumulator;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
export const getClientInfo = (clients, ip) => {
|
export const getClientInfo = (clients, ip) => {
|
||||||
|
|
Loading…
Reference in New Issue