(batch)
| 191 | } |
| 192 | |
| 193 | function* yieldBoundedBatch(batch) { |
| 194 | if (batch.length === 0) { |
| 195 | return; |
| 196 | } |
| 197 | if (batch.length <= FROM_BATCH_SIZE) { |
| 198 | yield batch; |
| 199 | return; |
| 200 | } |
| 201 | for (let i = 0; i < batch.length; i += FROM_BATCH_SIZE) { |
| 202 | yield ArrayPrototypeSlice(batch, i, i + FROM_BATCH_SIZE); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * Normalize a sync streamable source, yielding batches of Uint8Array. |
no outgoing calls
no test coverage detected