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