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

Function decodeInteger

static/app/utils/queryString.tsx:127–139  ·  view source on GitHub ↗
(value: QueryValue, fallback?: number)

Source from the content-addressed store, hash-verified

125export function decodeInteger(value: QueryValue): number | undefined;
126export function decodeInteger(value: QueryValue, fallback: number): number;
127export function decodeInteger(value: QueryValue, fallback?: number): number | undefined {
128 const unwrapped = decodeScalar(value);
129
130 if (unwrapped === undefined) {
131 return fallback;
132 }
133
134 const parsed = parseInt(unwrapped, 10);
135 if (isFinite(parsed)) {
136 return parsed;
137 }
138 return fallback;
139}
140
141export function decodeSorts(value: QueryValue): Sort[];
142export function decodeSorts(value: QueryValue, fallback: string): Sort[];

Callers 15

UpdatedEmptyStateFunction · 0.90
DataWidgetViewerModalFunction · 0.90
ViewerTableV2Function · 0.90
OnboardingFunction · 0.90
deserializeLimitFunction · 0.90
OnboardingFunction · 0.90
decodeHistogramZoomFunction · 0.90
OnboardingFunction · 0.90

Calls 1

decodeScalarFunction · 0.85

Tested by

no test coverage detected