calckey/src/misc/get-user-name.ts

6 lines
133 B
TypeScript

import { User } from '../models/entities/user';
export default function(user: User): string {
return user.name || user.username;
}