MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / resolveRelativeUrl

Function resolveRelativeUrl

assets/main.js:679–687  ·  view source on GitHub ↗
(base, relativePath)

Source from the content-addressed store, hash-verified

677}
678
679function resolveRelativeUrl(base, relativePath) {
680 try {
681 const baseUrl = base instanceof URL ? base : new URL(base, window.location.href);
682 return new URL(relativePath, baseUrl).toString();
683 } catch (error) {
684 console.warn("Konnte relative URL nicht auflösen:", relativePath, error);
685 return null;
686 }
687}
688
689function decodeBase64ToUint8Array(base64) {
690 if (typeof atob === "function") {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected