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

Function loginHostLabel

apps/cli/src/main.ts:2384–2392  ·  view source on GitHub ↗
(origin: string)

Source from the content-addressed store, hash-verified

2382);
2383
2384const loginHostLabel = (origin: string): string => {
2385 try {
2386 const host = new URL(origin).hostname;
2387 const first = host.split(".")[0];
2388 return first && first.length > 0 ? first : host;
2389 } catch {
2390 return "server";
2391 }
2392};
2393
2394const sanitizeProfileName = (raw: string): string => {
2395 const cleaned = raw

Callers 1

chooseLoginProfileNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected