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

Function stripUrlQueryAndFragment

packages/core/src/utils/url.ts:244–246  ·  view source on GitHub ↗
(urlPath: string)

Source from the content-addressed store, hash-verified

242 * @returns URL or path without query string or fragment
243 */
244export function stripUrlQueryAndFragment(urlPath: string): string {
245 return (urlPath.split(/[?#]/, 1) as [string, ...string[]])[0];
246}
247
248/**
249 * Takes a URL object and returns a sanitized string which is safe to use as span name

Callers 15

_wrapHttpFunctionFunction · 0.90
TraceServiceClass · 0.90
url.test.tsFile · 0.90
applyFunction · 0.90
createSpanFunction · 0.90
isStaticAssetRequestFunction · 0.90
startSpanFunction · 0.90
isStaticAssetRequestFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected