(filter = {})
| 94 | } |
| 95 | |
| 96 | function 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 | |
| 113 | function dedupeFilters(filters = []) { |
| 114 | const seen = new Set(); |
no test coverage detected