(library)
| 57 | }; |
| 58 | |
| 59 | export function getBaseUrl(library) { |
| 60 | let env = process.env.DOCS_ENV; |
| 61 | let base = env ? BASE_URL[env][library] : `http://localhost:1234/${library}`; |
| 62 | let publicUrl = process.env.PUBLIC_URL; |
| 63 | if (publicUrl) { |
| 64 | let url = new URL(base); |
| 65 | url.pathname = publicUrl.replace(/\/$/, '') + url.pathname.replace(/\/$/, ''); |
| 66 | base = url.href; |
| 67 | } |
| 68 | return base.replace(/\/$/, ''); |
| 69 | } |
| 70 | |
| 71 | export function getAnchorProps(href) { |
| 72 | if (href.startsWith('v3:') || href.startsWith('react-aria:')) { |
no outgoing calls
no test coverage detected