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

Function normalizePath

packages/nitro/src/sourceMaps.ts:67–69  ·  view source on GitHub ↗

* Normalizes the beginning of a path from e.g. ../../../ to ./

(path: string)

Source from the content-addressed store, hash-verified

65 * Normalizes the beginning of a path from e.g. ../../../ to ./
66 */
67function normalizePath(path: string): string {
68 return path.replace(/^(\.\.\/)+/, './');
69}
70
71/**
72 * Removes a trailing slash from a path so glob patterns can be appended cleanly.

Callers 1

getPluginOptionsFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected