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

Function decodeBoolean

static/app/utils/queryString.tsx:157–172  ·  view source on GitHub ↗
(
  value: QueryValue,
  fallback?: boolean
)

Source from the content-addressed store, hash-verified

155export function decodeBoolean(value: QueryValue): boolean | undefined;
156export function decodeBoolean(value: QueryValue, fallback: boolean): boolean;
157export function decodeBoolean(
158 value: QueryValue,
159 fallback?: boolean
160): boolean | undefined {
161 const unwrapped = decodeScalar(value);
162
163 if (unwrapped === 'true') {
164 return true;
165 }
166
167 if (unwrapped === 'false') {
168 return false;
169 }
170
171 return fallback;
172}
173
174/**
175 * If a tag conflicts with a reserved keyword, change it to `tags[key]:value`

Callers 6

createIssueViewFromUrlFunction · 0.90
componentDidMountMethod · 0.90
componentDidUpdateMethod · 0.90
_getWidgetExploreUrlFunction · 0.90

Calls 1

decodeScalarFunction · 0.85

Tested by

no test coverage detected