beginning of interface

This commit is contained in:
Joshua Seigler 2025-04-01 19:55:09 -07:00
parent 420d719fc1
commit ef08eea8d9
3 changed files with 93 additions and 20 deletions

8
src/utils.ts Normal file
View file

@ -0,0 +1,8 @@
export function shuffleArray<T>(array: T[]) {
const copy = Array.from(array)
for (let i = copy.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[copy[i], copy[j]] = [copy[j], copy[i]];
}
return copy
}