(items: T[], limit: number)
| 311 | } |
| 312 | |
| 313 | function splitByItemLimit<T>(items: T[], limit: number): T[][] { |
| 314 | if (items.length <= limit) return [items] |
| 315 | const result: T[][] = [] |
| 316 | for (let i = 0; i < items.length; i += limit) { |
| 317 | result.push(items.slice(i, i + limit)) |
| 318 | } |
| 319 | return result |
| 320 | } |
| 321 | |
| 322 | async function processWithConcurrency<T, R>( |
| 323 | items: T[], |
no test coverage detected