MCPcopy Create free account
hub / github.com/cloudflare/serverless-registry / parseLinkHeaderURL

Function parseLinkHeaderURL

test/index.test.ts:115–119  ·  view source on GitHub ↗
(link: string)

Source from the content-addressed store, hash-verified

113}
114
115function parseLinkHeaderURL(link: string): URL {
116 const rawURL = link.split(";")[0].trim();
117 const href = rawURL.startsWith("<") && rawURL.endsWith(">") ? rawURL.slice(1, -1) : rawURL;
118 return new URL(href);
119}
120
121function numberedDigest(index: number): string {
122 return `sha256:${index.toString(16).padStart(64, "0")}`;

Callers 1

index.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected