]> git.localhorst.tv Git - alttp.git/blob - resources/js/helpers/Application.js
basic auto tracking
[alttp.git] / resources / js / helpers / Application.js
1 import User from './User';
2
3 export const compareUsername = (a, b) => {
4         const a_name = a && a.user ? User.getUserName(a.user) : '';
5         const b_name = b && b.user ? User.getUserName(b.user) : '';
6         return a_name.localeCompare(b_name);
7 };
8
9 export const isDenied = a => a && a.denied;
10
11 export const isPending = a => a && !a.denied;
12
13 export default {
14         compareUsername,
15         isDenied,
16         isPending,
17 };