(items, size)
| 1075 | // slice is the remainder (length === size when items.length is a multiple of |
| 1076 | // size, otherwise items.length mod size). |
| 1077 | function chunkArray(items, size) { |
| 1078 | const chunks = []; |
| 1079 | for (let i = 0; i < items.length; i += size) { |
| 1080 | chunks.push(items.slice(i, i + size)); |
| 1081 | } |
| 1082 | return chunks; |
| 1083 | } |
| 1084 | |
| 1085 | function setStatsOutputs(out, stats, batchCounters, batchSize) { |
| 1086 | out("comments_total", String(stats.total)); |
no outgoing calls