MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / isUrlRelative

Function isUrlRelative

lib/utils.ts:443–445  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

441
442const absoluteChecker = new RegExp("^(?:[a-z+]+:)?//", "i");
443export function isUrlRelative(url: string): boolean {
444 return !absoluteChecker.test(url);
445}
446
447export function makeUrlAbsolute(url: string, href: string): string {
448 return new URL(href, url).href;

Callers 1

getUniqueLinksFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected