(items: T[], weekSize = 7)
| 16 | } |
| 17 | |
| 18 | export function chunkIntoWeeks<T>(items: T[], weekSize = 7): T[][] { |
| 19 | const result: T[][] = [] |
| 20 | for (let index = 0; index < items.length; index += weekSize) { |
| 21 | result.push(items.slice(index, index + weekSize)) |
| 22 | } |
| 23 | return result |
| 24 | } |
| 25 | |
| 26 | export function buildWeeklyEvolutionFromDaily( |
| 27 | daily: Array<{ day: string; downloads: number }>, |
no outgoing calls
no test coverage detected