MCPcopy Create free account
hub / github.com/github/awesome-copilot / pickAssetFile

Function pickAssetFile

eng/generate-website-data.mjs:739–747  ·  view source on GitHub ↗
(files, preferredNames)

Source from the content-addressed store, hash-verified

737}
738
739function pickAssetFile(files, preferredNames) {
740 const preferredLookup = new Set(preferredNames.map((name) => name.toLowerCase()));
741 for (const file of files) {
742 if (preferredLookup.has(file.toLowerCase())) {
743 return file;
744 }
745 }
746 return files[0] || null;
747}
748
749function getExtensionAssetInfo(extensionDir, relPath, ref) {
750 const files = getImageAssetFiles(extensionDir);

Callers 1

getExtensionAssetInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected