MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / stringMatchesSomePattern

Function stringMatchesSomePattern

packages/core/src/utils/string.ts:132–145  ·  view source on GitHub ↗
(
  testString: string,
  patterns:
    | Array<string | RegExp | ((value: string) => boolean)>
    | Set<string | RegExp | ((value: string) => boolean)> = [],
  requireExactStringMatch: boolean = false,
)

Source from the content-addressed store, hash-verified

130 * @returns
131 */
132export function stringMatchesSomePattern(
133 testString: string,
134 patterns:
135 | Array<string | RegExp | ((value: string) => boolean)>
136 | Set<string | RegExp | ((value: string) => boolean)> = [],
137 requireExactStringMatch: boolean = false,
138): boolean {
139 for (const pattern of patterns) {
140 if (isMatchingPattern(testString, pattern, requireExactStringMatch)) {
141 return true;
142 }
143 }
144 return false;
145}

Callers 15

string.test.tsFile · 0.90
instrumentConsoleFunction · 0.90
_isIgnoredErrorFunction · 0.90
_isIgnoredTransactionFunction · 0.90
_isDeniedUrlFunction · 0.90
_isAllowedUrlFunction · 0.90
isLayerIgnoredFunction · 0.90
wrappingLoaderFunction · 0.90
_shouldAttachTraceDataFunction · 0.90
_addMeasureSpansFunction · 0.90
urlMatchesFunction · 0.90

Calls 1

isMatchingPatternFunction · 0.85

Tested by

no test coverage detected