MCPcopy Create free account
hub / github.com/MemTensor/MemOS / normalizeHubUrl

Function normalizeHubUrl

packages/memos-core/src/client/hub.ts:217–222  ·  view source on GitHub ↗
(hubAddress: string)

Source from the content-addressed store, hash-verified

215}
216
217export function normalizeHubUrl(hubAddress: string): string {
218 const trimmed = hubAddress.trim().replace(/\/+$/, "");
219 if (!trimmed) return "";
220 if (/^https?:\/\//i.test(trimmed)) return trimmed;
221 return `http://${trimmed}`;
222}

Callers 11

connectToHubFunction · 0.90
getHubStatusFunction · 0.90
autoJoinHubFunction · 0.90
serveSharingStatusMethod · 0.90
handleRetryJoinMethod · 0.90
resolveHubConnectionMethod · 0.90
handleSaveConfigMethod · 0.90
autoJoinOnSaveMethod · 0.90
withdrawOrLeaveHubMethod · 0.90
resolveHubClientFunction · 0.70
hubRequestJsonFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected