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

Function hostSlug

packages/core/sdk/src/migration-spec.ts:756–762  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

754}
755
756const hostSlug = (url: string): string => {
757 // Parse defensively — a malformed URL falls back to a generic stem.
758 const match = /^[a-z]+:\/\/([^/:]+)/i.exec(url);
759 const host = match?.[1] ?? "client";
760 const label = host.split(".").length > 1 ? host.split(".").slice(-2, -1)[0] : host;
761 return slugifyVariable(label ?? "client") || "client";
762};
763
764export const dedupeOAuthClients = (
765 inputs: readonly PlannedOAuthClientInput[],

Callers 1

dedupeOAuthClientsFunction · 0.85

Calls 2

execMethod · 0.80
slugifyVariableFunction · 0.70

Tested by

no test coverage detected