MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / getLetter

Function getLetter

packages/utilities/src/string.ts:63–69  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

61}
62
63export function getLetter(text: string): string {
64 const character = text.trim().slice(0, 1).toLowerCase();
65 if (isLetter(character)) {
66 return character;
67 }
68 return 'u';
69}

Callers 4

string.spec.tsFile · 0.90
TextAvatarFunction · 0.90
SymbolFunction · 0.90
EmojiFunction · 0.90

Calls 1

isLetterFunction · 0.85

Tested by

no test coverage detected