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

Function toExtensionRelativePath

eng/generate-website-data.mjs:1188–1195  ·  view source on GitHub ↗
(assetPath, extensionId)

Source from the content-addressed store, hash-verified

1186 const manifests = new Map();
1187
1188 function toExtensionRelativePath(assetPath, extensionId) {
1189 const normalizedPath = normalizeText(assetPath).replace(/\\/g, "/");
1190 if (!normalizedPath) return null;
1191 const prefix = `extensions/${extensionId}/`;
1192 return normalizedPath.startsWith(prefix)
1193 ? normalizedPath.slice(prefix.length)
1194 : normalizedPath;
1195 }
1196
1197 function toRelativeScreenshots(screenshots, extensionId) {
1198 if (!screenshots) return { icon: null, gallery: null };

Callers 1

toRelativeEntryFunction · 0.85

Calls 1

normalizeTextFunction · 0.70

Tested by

no test coverage detected