firefish/packages/client/src/scripts/get-user-name.ts

7 lines
126 B
TypeScript
Raw Normal View History

2023-07-20 04:17:05 +09:00
export default function (user: {
name?: string | null;
username: string;
}): string {
return user.name ?? user.username;
2023-07-20 04:17:05 +09:00
}