MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / toBuffer

Function toBuffer

out/cli.cjs:25897–25905  ·  view source on GitHub ↗
(stream4)

Source from the content-addressed store, hash-verified

25895 var http4 = __importStar(require("http"));
25896 var https3 = __importStar(require("https"));
25897 async function toBuffer(stream4) {
25898 let length = 0;
25899 const chunks = [];
25900 for await (const chunk of stream4) {
25901 length += chunk.length;
25902 chunks.push(chunk);
25903 }
25904 return Buffer.concat(chunks, length);
25905 }
25906 exports2.toBuffer = toBuffer;
25907 async function json(stream4) {
25908 const buf = await toBuffer(stream4);

Callers 1

jsonFunction · 0.85

Calls 2

concatMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…