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

Function absoluteSourceFile

packages/nativescript-inspector/src/index.ts:2237–2243  ·  view source on GitHub ↗
(file: string, sourceRoot: string)

Source from the content-addressed store, hash-verified

2235}
2236
2237function absoluteSourceFile(file: string, sourceRoot: string): string {
2238 const cleanFile = stringValue(file);
2239 if (!cleanFile || isAbsoluteSourceFile(cleanFile) || !sourceRoot) {
2240 return cleanFile;
2241 }
2242 return `${sourceRoot}/${cleanFile.replace(/^\.?\//, "")}`;
2243}
2244
2245function isAbsoluteSourceFile(file: string): boolean {
2246 return (

Callers 1

sourceLocationForViewFunction · 0.70

Calls 3

stringValueFunction · 0.85
isAbsoluteSourceFileFunction · 0.70
replaceMethod · 0.65

Tested by

no test coverage detected