(pathname: string)
| 142 | * It expects the version to be in the format like 'v22.0.4'. |
| 143 | */ |
| 144 | export const extractVersionFromPath = (pathname: string) => { |
| 145 | const segments = pathname.split('/').filter(Boolean); |
| 146 | // The version is expected to be the last segment in the path |
| 147 | const version = segments.pop()!; |
| 148 | |
| 149 | return version; |
| 150 | }; |
no outgoing calls
no test coverage detected