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

Function getAnyExtensionFromPathWorker

test/fixtures/snapshot/typescript.js:7777–7788  ·  view source on GitHub ↗
(path, extensions, stringEqualityComparer)

Source from the content-addressed store, hash-verified

7775 }
7776 }
7777 function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) {
7778 if (typeof extensions === "string") {
7779 return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || "";
7780 }
7781 for (var _i = 0, extensions_2 = extensions; _i < extensions_2.length; _i++) {
7782 var extension = extensions_2[_i];
7783 var result = tryGetExtensionFromPath(path, extension, stringEqualityComparer);
7784 if (result)
7785 return result;
7786 }
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.

Callers 1

getAnyExtensionFromPathFunction · 0.85

Calls 1

tryGetExtensionFromPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…