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

Function registerWithName

packages/core/globals/index.ts:107–114  ·  view source on GitHub ↗
(nickName: string, moduleId: string)

Source from the content-addressed store, hash-verified

105
106global.registerBundlerModules = function registerBundlerModules(context: Context, extensionMap: ExtensionMap = {}) {
107 const registerWithName = (nickName: string, moduleId: string) => {
108 modules.set(nickName, {
109 moduleId,
110 loader: () => {
111 return context(moduleId);
112 },
113 });
114 };
115
116 const registerModuleById = (moduleId: string) => {
117 const extDotIndex = moduleId.lastIndexOf('.');

Callers 1

registerModuleByIdFunction · 0.85

Calls 2

contextFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected