MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / parseUrl

Function parseUrl

www/js/ext/socket.esm.js:72–83  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

70 });
71}
72function parseUrl(url) {
73 var finalUrl = url;
74 if (finalUrl.startsWith("/")) {
75 var basePart = window.location.hostname + (window.location.port ? ":" + window.location.port : "");
76 if (window.location.protocol === "https:") {
77 finalUrl = "wss://" + basePart + finalUrl;
78 } else if (window.location.protocol === "http:") {
79 finalUrl = "ws://" + basePart + finalUrl;
80 }
81 }
82 return finalUrl;
83}
84var PROXY_BLACKLIST = ["then", "catch", "length", "toJSON"];
85var SocketFeature = class _SocketFeature extends Feature {
86 static keyword = "socket";

Callers 2

parseMethod · 0.70
getProxyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected