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

Function loginHostLabel

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

Source from the content-addressed store, hash-verified

2300);
2301
2302const loginHostLabel = (origin: string): string => {
2303 try {
2304 const host = new URL(origin).hostname;
2305 const first = host.split(".")[0];
2306 return first && first.length > 0 ? first : host;
2307 } catch {
2308 return "server";
2309 }
2310};
2311
2312const sanitizeProfileName = (raw: string): string => {
2313 const cleaned = raw

Callers 1

chooseLoginProfileNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected