MCPcopy
hub / github.com/github/docs / splitByLanguage

Function splitByLanguage

middleware/archived-enterprise-versions.js:22–30  ·  view source on GitHub ↗
(uri)

Source from the content-addressed store, hash-verified

20const REMOTE_ENTERPRISE_STORAGE_URL = 'https://githubdocs.azureedge.net/enterprise'
21
22function splitByLanguage(uri) {
23 let language = null
24 let withoutLanguage = uri
25 if (languagePrefixPathRegex.test(uri)) {
26 language = uri.match(languagePrefixPathRegex)[1]
27 withoutLanguage = uri.replace(languagePrefixPathRegex, '/')
28 }
29 return [language, withoutLanguage]
30}
31
32// These files are huge so lazy-load them. But note that the
33// `readJsonFileLazily()` function will, at import-time, check that

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected