diff options
Diffstat (limited to 'src/common/get-user-summary.ts')
| -rw-r--r-- | src/common/get-user-summary.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/get-user-summary.ts b/src/common/get-user-summary.ts new file mode 100644 index 0000000000..1bec2f9a26 --- /dev/null +++ b/src/common/get-user-summary.ts @@ -0,0 +1,12 @@ +import { IUser } from '../api/models/user'; + +/** + * ユーザーを表す文字列を取得します。 + * @param user ユーザー + */ +export default function(user: IUser): string { + return `${user.name} (@${user.username})\n` + + `${user.posts_count}投稿、${user.following_count}フォロー、${user.followers_count}フォロワー\n` + + `場所: ${user.profile.location}、誕生日: ${user.profile.birthday}\n` + + `「${user.description}」`; +} |