mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
11 lines
208 B
TypeScript
11 lines
208 B
TypeScript
export function getInitials(name?: string): string | undefined {
|
|
if (!name || !name.length) {
|
|
return;
|
|
}
|
|
|
|
if (name.length > 2 && name.startsWith('05')) {
|
|
return name[2];
|
|
}
|
|
|
|
return name[0];
|
|
}
|