MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / createModule

Function createModule

packager/src/node-haste/__tests__/Module-test.js:61–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60 let transformCacheKey;
61 const createModule = options =>
62 new Module({
63 options: {},
64 transformCode: (module, sourceCode, transformOptions) => {
65 return Promise.resolve({code: sourceCode});
66 },
67 ...options,
68 cache,
69 file: options && options.file || fileName,
70 depGraphHelpers: new DependencyGraphHelpers(),
71 moduleCache: new ModuleCache({cache}),
72 getTransformCacheKey: () => transformCacheKey,
73 });
74
75 const createJSONModule =
76 options => createModule({...options, file: '/root/package.json'});

Callers 2

createJSONModuleFunction · 0.70
Module-test.jsFile · 0.70

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…