]> git.localhorst.tv Git - alttp.git/blob - resources/js/helpers/Channel.js
tracker descriptions
[alttp.git] / resources / js / helpers / Channel.js
1 export const hasActiveGuessing = channel =>
2         channel && channel.guessing_start;
3
4 export const isAcceptingGuesses = channel =>
5         channel && channel.guessing_start && !channel.guessing_end;
6
7 export const patchGuess = (guesses, guess) =>
8         [guess, ...(guesses || []).filter(g => g.uid !== guess.uid)];
9
10 export const patchWinner = (winners, winner) =>
11         [winner, ...(winners || []).filter(w => w.uid !== winner.uid)];