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

Function writeToStream

out/cli.cjs:6386–6398  ·  view source on GitHub ↗
(dest, instance)

Source from the content-addressed store, hash-verified

6384 }
6385 }
6386 function writeToStream(dest, instance) {
6387 const body = instance.body;
6388 if (body === null) {
6389 dest.end();
6390 } else if (isBlob4(body)) {
6391 body.stream().pipe(dest);
6392 } else if (Buffer.isBuffer(body)) {
6393 dest.write(body);
6394 dest.end();
6395 } else {
6396 body.pipe(dest);
6397 }
6398 }
6399 Body.Promise = global.Promise;
6400 var invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
6401 var invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;

Callers 1

fetch4Function · 0.85

Calls 5

isBlob4Function · 0.85
endMethod · 0.80
pipeMethod · 0.80
streamMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…