9 lines
174 B
TypeScript
9 lines
174 B
TypeScript
type UserLike = {
|
|
host: string;
|
|
username: string;
|
|
};
|
|
|
|
export default (user: UserLike) => {
|
|
return user.host === null ? user.username : `${user.username}@${user.host}`;
|
|
};
|