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

Function initialsFor

packages/react/src/multiplayer/shell.tsx:254–264  ·  view source on GitHub ↗
(name: string | null, email: string)

Source from the content-addressed store, hash-verified

252// ── Avatar / initials ──────────────────────────────────────────────────────
253
254function initialsFor(name: string | null, email: string) {
255 if (name) {
256 return name
257 .split(" ")
258 .map((n) => n[0])
259 .join("")
260 .slice(0, 2)
261 .toUpperCase();
262 }
263 return email[0]!.toUpperCase();
264}
265
266function Avatar(props: { url: string | null; name: string | null; email: string }) {
267 if (props.url) {

Callers 1

AvatarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected