(u: StoredUserInfo)
| 42 | * in heygen-cli. |
| 43 | */ |
| 44 | export function userDisplayName(u: StoredUserInfo): string | undefined { |
| 45 | if (u.email) return u.email; |
| 46 | const name = combineName(u.first_name, u.last_name); |
| 47 | if (name) return name; |
| 48 | return u.username || undefined; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * `"first last"` when both are present; otherwise `first || last || ""` |
no test coverage detected