Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
refactor(filter): remove now obsolete filters
Alexander Klein06f24b0c90b0
diff --git a/lib/filters.js b/lib/filters.jsindex d48536185..5797ba3f1 100644--- a/lib/filters.js+++ b/lib/filters.js@@ -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] }));};-export const browserFilter = data =>- 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 browserFilter = data => data.map(({ x, y }) => ({ x: BROWSERS[x] ?? x, y }));export const percentFilter = data => {const total = data.reduce((n, { y }) => n + y, 0);