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