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

Function getAnyExtensionFromPath

test/fixtures/snapshot/typescript.js:7789–7801  ·  view source on GitHub ↗
(path, extensions, ignoreCase)

Source from the content-addressed store, hash-verified

7787 return "";
7788 }
7789 function getAnyExtensionFromPath(path, extensions, ignoreCase) {
7790 // Retrieves any string from the final "." onwards from a base file name.
7791 // Unlike extensionFromPath, which throws an exception on unrecognized extensions.
7792 if (extensions) {
7793 return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? ts.equateStringsCaseInsensitive : ts.equateStringsCaseSensitive);
7794 }
7795 var baseFileName = getBaseFileName(path);
7796 var extensionIndex = baseFileName.lastIndexOf(".");
7797 if (extensionIndex >= 0) {
7798 return baseFileName.substring(extensionIndex);
7799 }
7800 return "";
7801 }
7802 ts.getAnyExtensionFromPath = getAnyExtensionFromPath;
7803 function pathComponents(path, rootLength) {
7804 var root = path.substring(0, rootLength);

Callers 2

getBaseFileNameFunction · 0.85
changeAnyExtensionFunction · 0.85

Calls 3

getBaseFileNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…