MCPcopy Index your code
hub / github.com/nodejs/node / getNodeModulesPackageName

Function getNodeModulesPackageName

test/fixtures/snapshot/typescript.js:122007–122012  ·  view source on GitHub ↗
(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options)

Source from the content-addressed store, hash-verified

122005 }
122006 moduleSpecifiers_1.getModuleSpecifier = getModuleSpecifier;
122007 function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options) {
122008 if (options === void 0) { options = {}; }
122009 var info = getInfo(importingSourceFile.path, host);
122010 var modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options);
122011 return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, preferences, /*packageNameOnly*/ true, options.overrideImportMode); });
122012 }
122013 moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
122014 function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences, userPreferences, options) {
122015 if (options === void 0) { options = {}; }

Callers

nothing calls this directly

Calls 3

getInfoFunction · 0.85
getAllModulePathsFunction · 0.85

Tested by

no test coverage detected