gamja-old/state.js
2020-06-24 16:56:57 +02:00

20 lines
349 B
JavaScript

export const SERVER_BUFFER = "*";
export const Status = {
DISCONNECTED: "disconnected",
CONNECTING: "connecting",
REGISTERED: "registered",
};
export const Unread = {
NONE: "",
MESSAGE: "message",
union: (a, b) => {
const priority = {
[Unread.None]: 0,
[Unread.MESSAGE]: 1,
};
return (priority[a] > priority[b]) ? a : b;
},
};