(items, size)
| 652 | // slice is the remainder (length === size when items.length is a multiple of |
| 653 | // size, otherwise items.length mod size). |
| 654 | function chunkArray(items, size) { |
| 655 | const chunks = []; |
| 656 | for (let i = 0; i < items.length; i += size) { |
| 657 | chunks.push(items.slice(i, i + size)); |
| 658 | } |
| 659 | return chunks; |
| 660 | } |
| 661 | |
| 662 | function setStatsOutputs(out, stats, batchCounters, batchSize) { |
| 663 | out("comments_total", String(stats.total)); |
no outgoing calls