(baseUrl: string, endpoint?: string)
| 468 | } |
| 469 | return providerConfig.url; |
| 470 | }; |
| 471 | |
| 472 | const resolveEndpointUrl = (baseUrl: string, endpoint?: string): string => { |
| 473 | if (!endpoint) return baseUrl; |
| 474 | if (/^https?:\/\//.test(endpoint)) return endpoint; |
| 475 | const base = baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`; |
| 476 | const cleaned = endpoint.startsWith("/") ? endpoint.slice(1) : endpoint; |
| 477 | return new URL(cleaned, base).toString(); |
| 478 | }; |
| 479 |
no outgoing calls
no test coverage detected