(href)
| 24 | |
| 25 | // Remove the version segment from the path |
| 26 | export function getPathWithoutVersion(href) { |
| 27 | const versionFromPath = getVersionStringFromPath(href) |
| 28 | |
| 29 | // If the derived version is not found in the list of all versions, just return the HREF |
| 30 | return allVersions[versionFromPath] |
| 31 | ? href.replace(`/${getVersionStringFromPath(href)}`, '') |
| 32 | : href |
| 33 | } |
| 34 | |
| 35 | // Return the version segment in a path |
| 36 | export function getVersionStringFromPath(href, supportedOnly = false) { |
no test coverage detected