2020-08-20 02:10:42 +02:00
|
|
|
export function shuffleArray(inputArray) {
|
2020-08-18 14:04:33 +02:00
|
|
|
const array = inputArray.slice();
|
|
|
|
for (let i = array.length - 1; i > 0; i--) {
|
|
|
|
const j = Math.floor(Math.random() * (i + 1));
|
|
|
|
const x = array[i];
|
|
|
|
array[i] = array[j];
|
|
|
|
array[j] = x;
|
|
|
|
}
|
|
|
|
return array;
|
|
|
|
}
|
|
|
|
//# sourceMappingURL=shuffleArray.js.map
|