refactor(filter): remove now obsolete filters

This commit is contained in:
Alexander Klein 2021-02-19 09:58:58 +01:00
parent ba4272c878
commit 06f24b0c90

View File

@ -113,12 +113,7 @@ export const refFilter = (data, { domain, domainOnly, raw }) => {
return Object.keys(map).map(key => ({ x: key, y: map[key], w: links[key] })); return Object.keys(map).map(key => ({ x: key, y: map[key], w: links[key] }));
}; };
export const browserFilter = data => export const browserFilter = data => data.map(({ x, y }) => ({ x: BROWSERS[x] ?? x, y }));
data.map(({ x, y }) => ({ x: BROWSERS[x] || x, y })).filter(({ x }) => x);
export const osFilter = data => data.filter(({ x }) => x);
export const deviceFilter = data => data.filter(({ x }) => x);
export const percentFilter = data => { export const percentFilter = data => {
const total = data.reduce((n, { y }) => n + y, 0); const total = data.reduce((n, { y }) => n + y, 0);