MCPcopy
hub / github.com/graphql/graphql-spec / normalizeName

Function normalizeName

scripts/generate-contributor-list.mjs:15–22  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

13function die(msg, code = 1) { console.error(msg); process.exit(code) }
14
15function normalizeName(s) {
16 return (s || "")
17 .normalize("NFKD")
18 .replace(/\p{Diacritic}/gu, "")
19 .replace(/\s+/g, " ")
20 .trim()
21 .toLowerCase();
22}
23function pickBetterName(current, candidate) {
24 if (!current) return (candidate || "").trim();
25 const c = current.trim();

Callers 2

searchUsersByNameExactFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected