Updated filter processing logic.

This commit is contained in:
Mike Cao 2022-04-11 00:19:29 -07:00
parent fb2dc9f5ab
commit df1ddf3e73
4 changed files with 51 additions and 53 deletions

View file

@ -1,4 +1,3 @@
import { BROWSERS } from './constants';
import { removeTrailingSlash, removeWWW, getDomainName } from './url';
export const urlFilter = (data, { raw }) => {
@ -113,8 +112,6 @@ 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 }));
export const eventTypeFilter = (data, types) => {
if (!types || types.length === 0) {
return data;