(href)
| 106 | } |
| 107 | |
| 108 | export function getCategoryStringFromPath(href) { |
| 109 | href = getPathWithoutLanguage(href) |
| 110 | |
| 111 | if (href === '/') return null |
| 112 | |
| 113 | const pathParts = href.split('/') |
| 114 | |
| 115 | if (pathParts.includes('early-access')) return null |
| 116 | |
| 117 | const productIndex = productIds.includes(pathParts[2]) ? 2 : 1 |
| 118 | |
| 119 | return pathParts[productIndex + 1] |
| 120 | } |
| 121 | |
| 122 | export default { |
| 123 | getPathWithLanguage, |
no test coverage detected