(link: { link?: string })
| 36 | } |
| 37 | |
| 38 | export function isLocalizedLink(link: { link?: string }) { |
| 39 | for (const code of KNOWN_LANGUAGE_CODES) { |
| 40 | if (link.link?.startsWith(`/${code}`)) { |
| 41 | return true; |
| 42 | } |
| 43 | } |
| 44 | return false; |
| 45 | } |
| 46 | |
| 47 | export function createLink(item: { text: LText; link: string }, lang: string): string { |
| 48 | if (isExternal(item)) { |
no outgoing calls
no test coverage detected
searching dependent graphs…