MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / resolve

Function resolve

packages/vite/hmr/shared/runtime/vendor-bootstrap.ts:47–59  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

45 }
46
47 const resolve = (id: string) => {
48 const normalized = String(id ?? '').replace(/[?#].*$/, '');
49 if (registry.has(normalized)) return normalized;
50 if ((modules as any)[normalized]) return normalized;
51 // direct alias
52 const direct = aliases.get(normalized);
53 if (direct) return direct;
54 // normalize slashes for alias lookups
55 const slashNorm = normalized.replace(/\\/g, '/');
56 const aliasNormalized = aliases.get(slashNorm) || aliases.get(slashNorm);
57 if (aliasNormalized) return aliasNormalized;
58 return normalized;
59 };
60 try {
61 setGlobal('__nsResolveVendor', resolve);
62 } catch {}

Callers 3

ensureModuleFunction · 0.70
finishFunction · 0.50
withEventsFunction · 0.50

Calls 3

replaceMethod · 0.80
getMethod · 0.65
StringClass · 0.50

Tested by

no test coverage detected