MCPcopy
hub / github.com/imgly/background-removal-js / ensureAbsoluteURI

Function ensureAbsoluteURI

packages/node/src/url.ts:8–14  ·  view source on GitHub ↗
(url: string, baseUrl: string)

Source from the content-addressed store, hash-verified

6}
7
8function ensureAbsoluteURI(url: string, baseUrl: string): URL {
9 if (isAbsoluteURI(url)) {
10 return new URL(url);
11 } else {
12 return new URL(url, baseUrl);
13 }
14}

Callers 2

loadAsBlobFunction · 0.90
imageSourceToImageDataFunction · 0.90

Calls 1

isAbsoluteURIFunction · 0.70

Tested by

no test coverage detected