(items, size)
| 1052 | // slice is the remainder (length === size when items.length is a multiple of |
| 1053 | // size, otherwise items.length mod size). |
| 1054 | function chunkArray(items, size) { |
| 1055 | const chunks = []; |
| 1056 | for (let i = 0; i < items.length; i += size) { |
| 1057 | chunks.push(items.slice(i, i + size)); |
| 1058 | } |
| 1059 | return chunks; |
| 1060 | } |
| 1061 | |
| 1062 | function setStatsOutputs(out, stats, batchCounters, batchSize) { |
| 1063 | out("comments_total", String(stats.total)); |
no outgoing calls