MCPcopy Index your code
hub / github.com/getsentry/sentry / decodeSorts

Function decodeSorts

static/app/utils/queryString.tsx:143–153  ·  view source on GitHub ↗
(value: QueryValue, fallback?: string)

Source from the content-addressed store, hash-verified

141export function decodeSorts(value: QueryValue): Sort[];
142export function decodeSorts(value: QueryValue, fallback: string): Sort[];
143export function decodeSorts(value: QueryValue, fallback?: string): Sort[] {
144 const sorts = decodeList(value).filter(Boolean);
145 if (!sorts.length) {
146 return fallback ? decodeSorts(fallback) : [];
147 }
148 return sorts.map(sort =>
149 sort.startsWith('-')
150 ? {kind: 'desc', field: sort.substring(1)}
151 : {kind: 'asc', field: sort}
152 );
153}
154
155export function decodeBoolean(value: QueryValue): boolean | undefined;
156export function decodeBoolean(value: QueryValue, fallback: boolean): boolean;

Callers 15

ViewerTableV2Function · 0.90
useQueryBasedSortingFunction · 0.90
fromLocationMethod · 0.90
fromSavedQueryMethod · 0.90
parseAsSort.tsxFile · 0.90
useWebVitalsSortFunction · 0.90
EAPMobileOverviewPageFunction · 0.90
useSortedTimeSeriesFunction · 0.90
EventListFunction · 0.90
getWidgetMetricsUrlFunction · 0.90

Calls 3

decodeListFunction · 0.85
substringMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected