(items, size)
| 756 | // slice is the remainder (length === size when items.length is a multiple of |
| 757 | // size, otherwise items.length mod size). |
| 758 | function chunkArray(items, size) { |
| 759 | const chunks = []; |
| 760 | for (let i = 0; i < items.length; i += size) { |
| 761 | chunks.push(items.slice(i, i + size)); |
| 762 | } |
| 763 | return chunks; |
| 764 | } |
| 765 | |
| 766 | function setStatsOutputs(out, stats, batchCounters, batchSize) { |
| 767 | out("comments_total", String(stats.total)); |
no outgoing calls