MCPcopy
hub / github.com/github/docs / getPathWithoutLanguage

Function getPathWithoutLanguage

lib/path-utils.js:21–23  ·  view source on GitHub ↗
(href)

Source from the content-addressed store, hash-verified

19// Remove the language from the given HREF
20// /en/articles/foo -> /articles/foo
21export function getPathWithoutLanguage(href) {
22 return slash(href.replace(patterns.hasLanguageCode, '/'))
23}
24
25// Remove the version segment from the path
26export function getPathWithoutVersion(href) {

Callers 9

learningTrackFunction · 0.90
mainFunction · 0.90
getLanguageVariantsFunction · 0.90
getNewHrefFunction · 0.90
contextualizeFunction · 0.85
getPathWithLanguageFunction · 0.85
getVersionStringFromPathFunction · 0.85
getProductStringFromPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected