MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / getFilterKey

Function getFilterKey

server/modules/chartRuntimeFilters.js:96–111  ·  view source on GitHub ↗
(filter = {})

Source from the content-addressed store, hash-verified

94}
95
96function getFilterKey(filter = {}) {
97 return JSON.stringify({
98 type: filter.type || null,
99 field: filter.field || null,
100 operator: filter.operator || null,
101 value: normalizeValue(filter.value) ?? null,
102 startDate: filter.startDate || null,
103 endDate: filter.endDate || null,
104 exposed: Boolean(filter.exposed),
105 origin: filter.origin || "dashboard",
106 scope: filter.scope || "chart",
107 cdcId: filter.cdcId ?? null,
108 clientOnly: Boolean(filter.clientOnly),
109 forceSourceRefresh: Boolean(filter.forceSourceRefresh),
110 });
111}
112
113function dedupeFilters(filters = []) {
114 const seen = new Set();

Callers 1

dedupeFiltersFunction · 0.85

Calls 1

normalizeValueFunction · 0.70

Tested by

no test coverage detected