MCPcopy Create free account
hub / github.com/cursor/community-plugins / generateNameAbbr

Function generateNameAbbr

apps/cursor/src/lib/utils.ts:35–41  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

33}
34
35export function generateNameAbbr(name: string): string {
36 const firstCharRegex = /[\p{L}]/u;
37
38 const match = name.match(firstCharRegex);
39
40 return match ? match[0].toUpperCase() : "";
41}
42
43const countryDisplayNames =
44 typeof Intl !== "undefined" && typeof Intl.DisplayNames !== "undefined"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected