MCPcopy
hub / github.com/github/docs / getLanguageVariants

Function getLanguageVariants

script/purge-fastly-by-url.js:98–104  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

96}
97
98function getLanguageVariants(url) {
99 // for https://docs.github.com/en/foo, get https://docs.github.com/foo
100 const languagelessUrl = getPathWithoutLanguage(url.replace(requiredUrlPrefix, ''))
101
102 // then derive localized urls
103 return languageCodes.map((lc) => path.join(requiredUrlPrefix, lc, languagelessUrl))
104}
105
106function logStatus(result) {
107 // only log status if it's not ok

Callers 1

purgeFunction · 0.85

Calls 1

getPathWithoutLanguageFunction · 0.90

Tested by

no test coverage detected