(chunks)
| 5501 | } |
| 5502 | |
| 5503 | function concatBytes(chunks) { |
| 5504 | const merged = new Uint8Array(chunks.reduce((sum, { length }) => sum + length, 0)); |
| 5505 | let offset = 0; |
| 5506 | for (const chunk of chunks) { |
| 5507 | merged.set(chunk, offset); |
| 5508 | offset += chunk.length; |
| 5509 | } |
| 5510 | return merged; |
| 5511 | } |
| 5512 | |
| 5513 | function withTimeout(promise, timeoutMs, label) { |
| 5514 | let timer; |
no outgoing calls
no test coverage detected