MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / toCtxKey

Function toCtxKey

packages/vite/configuration/javascript.ts:74–78  ·  view source on GitHub ↗
(abs: string)

Source from the content-addressed store, hash-verified

72 return '/' + abs.replace(/^\/+/, '');
73 }
74 function toCtxKey(abs: string) {
75 let rel = abs;
76 if (rel.startsWith(appRootPrefix)) rel = rel.slice(appRootPrefix.length);
77 return './' + rel;
78 }
79 const xmlFiles = enumerate((ext) => ext === 'xml').filter((f) => !shouldExcludeAbsolute(f));
80 const styleFiles = enumerate((ext) => styleExtsSet.has(ext)).filter((f) => !shouldExcludeAbsolute(f));
81 const jsFiles = enumerate((ext) => ext === 'js').filter((f) => !shouldExcludeAbsolute(f));

Callers 1

pushImportFunction · 0.70

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected