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

Function titlesDecoder

static/app/utils/url/useLocationQuery.spec.tsx:70–78  ·  view source on GitHub ↗
(value: QueryValue)

Source from the content-addressed store, hash-verified

68 type Title = 'Mr' | 'Ms' | 'Mx';
69
70 const titlesDecoder = (value: QueryValue): Title[] | undefined => {
71 const decodedValue = decodeList(value);
72
73 const validTitles = decodedValue.filter(v => {
74 return ['Mr', 'Ms', 'Mx'].includes(v);
75 }) as Title[];
76
77 return validTitles.length > 0 ? validTitles : undefined;
78 };
79
80 const {result} = renderHookWithProviders(useLocationQuery, {
81 initialProps: {

Callers

nothing calls this directly

Calls 2

decodeListFunction · 0.90
filterMethod · 0.45

Tested by

no test coverage detected