MCPcopy Create free account
hub / github.com/getsentry/sentry / collectQueryStringByKey

Function collectQueryStringByKey

static/app/utils/discover/eventView.tsx:217–232  ·  view source on GitHub ↗
(query: Query, key: string)

Source from the content-addressed store, hash-verified

215}
216
217const collectQueryStringByKey = (query: Query, key: string): string[] => {
218 const needle = query[key];
219 const collection = decodeList(needle);
220 return collection.reduce((acc: string[], item: string) => {
221 if (typeof item !== 'string') {
222 return acc;
223 }
224 item = item.trim();
225
226 if (item.length > 0) {
227 acc.push(item);
228 }
229
230 return acc;
231 }, []);
232};
233
234const decodeQuery = (location: Location): string => {
235 if (!location.query?.query) {

Callers 4

fromLocationMethod · 0.85
fromSavedQueryMethod · 0.85

Calls 3

decodeListFunction · 0.90
trimMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected