MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / parseUrl

Function parseUrl

packages/core/sdk/src/oauth-gc.ts:32–35  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

30
31/** Parse a string into a URL, or null when it is not a valid absolute URL. */
32export 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

Callers 6

canonicalDcrIssuerFunction · 0.90
issuerOriginFunction · 0.90
dcrClientSlugFunction · 0.90
canonicalIssuerUrlFunction · 0.85
hostOfUrlFunction · 0.85
registrableOriginOfUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected