MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / canParseApiBaseUrl

Function canParseApiBaseUrl

packages/react/src/api/server-profiles.tsx:64–69  ·  view source on GitHub ↗
(apiBaseUrl: string | undefined)

Source from the content-addressed store, hash-verified

62};
63
64const canParseApiBaseUrl = (apiBaseUrl: string | undefined): boolean => {
65 if (apiBaseUrl === undefined) return true;
66 const trimmed = apiBaseUrl.trim();
67 if (!trimmed) return true;
68 return hasHttpScheme(trimmed) && URL.canParse(trimmed);
69};
70
71const normalizeConnectionOption = (
72 input: ExecutorServerConnectionInput,

Callers 1

Calls 1

hasHttpSchemeFunction · 0.85

Tested by

no test coverage detected