(value: string)
| 30 | |
| 31 | /** Parse a string into a URL, or null when it is not a valid absolute URL. */ |
| 32 | export const parseUrl = (value: string): URL | null => { |
| 33 | if (!URL.canParse(value)) return null; |
| 34 | return new URL(value); |
| 35 | }; |
| 36 | |
| 37 | /** Canonicalize a discovered issuer to `origin` + path with trailing slashes |
| 38 | * stripped (RFC 8414 issuers are compared without a trailing slash). Null for |
no outgoing calls
no test coverage detected