MCPcopy
hub / github.com/di-sukharev/opencommit / readAllBytes

Function readAllBytes

out/cli.cjs:50983–50997  ·  view source on GitHub ↗
(reader)

Source from the content-addressed store, hash-verified

50981 }
50982 }
50983 function isomorphicEncode(input) {
50984 for (let i3 = 0; i3 < input.length; i3++) {
50985 assert2(input.charCodeAt(i3) <= 255);
50986 }
50987 return input;
50988 }
50989 async function readAllBytes(reader) {
50990 const bytes = [];
50991 let byteLength = 0;
50992 while (true) {
50993 const { done, value: chunk } = await reader.read();
50994 if (done) {
50995 return Buffer.concat(bytes, byteLength);
50996 }
50997 if (!isUint8Array(chunk)) {
50998 throw new TypeError("Received non-Uint8Array chunk");
50999 }
51000 bytes.push(chunk);

Callers 2

fullyReadBodyFunction · 0.85
putMethod · 0.85

Calls 3

concatMethod · 0.80
readMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…