MCPcopy Create free account
hub / github.com/cmliu/CF-Workers-CheckProxyIP / concatBytes

Function concatBytes

_worker.js:5503–5511  ·  view source on GitHub ↗
(chunks)

Source from the content-addressed store, hash-verified

5501}
5502
5503function 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
5513function withTimeout(promise, timeoutMs, label) {
5514 let timer;

Callers 1

handleCheckProxyRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected