MCPcopy
hub / github.com/getsentry/sentry / collectQueryStringByKey

Function collectQueryStringByKey

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

Source from the content-addressed store, hash-verified

212}
213
214const collectQueryStringByKey = (query: Query, key: string): string[] => {
215 const needle = query[key];
216 const collection = decodeList(needle);
217 return collection.reduce((acc: string[], item: string) => {
218 if (typeof item !== 'string') {
219 return acc;
220 }
221 item = item.trim();
222
223 if (item.length > 0) {
224 acc.push(item);
225 }
226
227 return acc;
228 }, []);
229};
230
231const decodeQuery = (location: Location): string => {
232 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