MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / normalizeSourceRoot

Function normalizeSourceRoot

packages/nativescript-inspector/src/index.ts:2232–2235  ·  view source on GitHub ↗
(sourceRoot: string | undefined)

Source from the content-addressed store, hash-verified

2230}
2231
2232function normalizeSourceRoot(sourceRoot: string | undefined): string {
2233 const root = stringValue(sourceRoot).replace(/\/+$/, "");
2234 return isAbsoluteSourceFile(root) ? root : "";
2235}
2236
2237function absoluteSourceFile(file: string, sourceRoot: string): string {
2238 const cleanFile = stringValue(file);

Callers 1

constructorMethod · 0.70

Calls 3

stringValueFunction · 0.85
isAbsoluteSourceFileFunction · 0.70
replaceMethod · 0.65

Tested by

no test coverage detected