This commit is contained in:
2023-12-05 17:36:31 +01:00
parent 89e6f9cff4
commit 0fc220ce94
25 changed files with 607 additions and 342 deletions

7
src/components/util.ts Normal file
View File

@ -0,0 +1,7 @@
export function window<T>(arr: T[], len: number): T[][] {
let result: T[][] = [];
for (let i = 0; i < arr.length; i += len) {
result.push(arr.slice(i, i + len));
}
return result;
}