mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-25 04:25:07 +01:00
4 lines
157 B
JavaScript
4 lines
157 B
JavaScript
|
export function avatarInitials(name) {
|
||
|
const words = name.split(" ").slice(0, 2);
|
||
|
return words.reduce((i, w) => i + w.charAt(0).toUpperCase(), "");
|
||
|
}
|