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

Function decodeScalar

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

Source from the content-addressed store, hash-verified

102export function decodeScalar(value: QueryValue): string | undefined;
103export function decodeScalar(value: QueryValue, fallback: string): string;
104export function decodeScalar(value: QueryValue, fallback?: string): string | undefined {
105 if (!value) {
106 return fallback;
107 }
108 const unwrapped =
109 Array.isArray(value) && value.length > 0
110 ? value[0]
111 : typeof value === 'string'
112 ? value
113 : fallback;
114 return typeof unwrapped === 'string' ? unwrapped : fallback;
115}
116
117export function decodeList(value: string[] | string | undefined | null): string[] {
118 if (!value) {

Callers 15

DataWidgetViewerModalFunction · 0.90
generateActionFunction · 0.90
FeedbackSearchFunction · 0.90
FeedbackCategoriesFunction · 0.90
useMailboxCountsFunction · 0.90
TableRenderFunction · 0.90
renderTrendsTableMethod · 0.90
renderMethod · 0.90
useChartIntervalImplFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected