voting progress

This commit is contained in:
Sendou
2020-01-02 02:49:24 +02:00
parent 7b68be59bb
commit 2c58d52e35
15 changed files with 514 additions and 36 deletions

13
utils/shuffleArray.js Normal file
View File

@@ -0,0 +1,13 @@
//https://stackoverflow.com/a/6274381
function shuffle(a) {
var j, x, i
for (i = a.length - 1; i > 0; i--) {
j = Math.floor(Math.random() * (i + 1))
x = a[i]
a[i] = a[j]
a[j] = x
}
return a
}
module.exports = shuffle