mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-28 09:21:00 +01:00
feat: add hero banner (#463)
This commit is contained in:
7
packages/common/src/array.ts
Normal file
7
packages/common/src/array.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const splitToNChunks = <T>(array: T[], chunks: number): T[][] => {
|
||||
const result: T[][] = [];
|
||||
for (let i = chunks; i > 0; i--) {
|
||||
result.push(array.splice(0, Math.ceil(array.length / i)));
|
||||
}
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user