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

Function sanitizeProfileName

apps/cli/src/main.ts:2281–2287  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

2279};
2280
2281const sanitizeProfileName = (raw: string): string => {
2282 const cleaned = raw
2283 .trim()
2284 .replace(/[^A-Za-z0-9_.-]+/g, "-")
2285 .replace(/^-+|-+$/g, "");
2286 return cleaned.length > 0 ? cleaned : "server";
2287};
2288
2289// The (origin, user, org) a stored oauth profile authenticates as, lets us
2290// recognize a re-login to the SAME account (update in place) versus a

Callers 1

chooseLoginProfileNameFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected