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

Function getMod

packages/vite/hmr/frameworks/vue/client/index.ts:30–38  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

28 const reg: Map<string, any> | undefined = g.__nsVendorRegistry;
29 const req: any = reg?.get ? g.__nsVendorRequire || g.__nsRequire || g.require : g.__nsRequire || g.require;
30 const getMod = (id: string) => {
31 try {
32 if (reg && reg.has(id)) return reg.get(id);
33 } catch {}
34 try {
35 if (typeof req === 'function') return req(id);
36 } catch {}
37 return null;
38 };
39 const nv = getMod('nativescript-vue');
40 const rh = getMod('nativescript-vue/dist/runtimeHelpers');
41 const wrap = (orig: any, label: string) => {

Callers 1

installNsVueDevShimsFunction · 0.85

Calls 2

reqFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected