egirlskey/src/misc/acct/render.ts
2018-07-25 00:51:30 +09:00

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}`;
};