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

Function concat

out/cli.cjs:75706–75733  ·  view source on GitHub ↗
(sources)

Source from the content-addressed store, hash-verified

75704 if (source instanceof Uint8Array) {
75705 return import_node_stream2.Readable.from(Buffer.from(source));
75706 } else if (isBlob3(source)) {
75707 return toStream(getRawContent(source));
75708 } else {
75709 return ensureNodeStream(source);
75710 }
75711}
75712async function concat(sources) {
75713 return function() {
75714 const streams = sources.map((x5) => typeof x5 === "function" ? x5() : x5).map(toStream);
75715 return import_node_stream2.Readable.from(function() {
75716 return __asyncGenerator(this, arguments, function* () {
75717 var _a5, e_1, _b2, _c2;
75718 for (const stream4 of streams) {
75719 try {
75720 for (var _d2 = true, stream_1 = (e_1 = void 0, __asyncValues(stream4)), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a5 = stream_1_1.done, !_a5; _d2 = true) {
75721 _c2 = stream_1_1.value;
75722 _d2 = false;
75723 const chunk = _c2;
75724 yield yield __await(chunk);
75725 }
75726 } catch (e_1_1) {
75727 e_1 = { error: e_1_1 };
75728 } finally {
75729 try {
75730 if (!_d2 && !_a5 && (_b2 = stream_1.return)) yield __await(_b2.call(stream_1));
75731 } finally {
75732 if (e_1) throw e_1.error;
75733 }
75734 }
75735 }
75736 });

Callers 1

buildRequestBodyFunction · 0.85

Calls 5

__asyncGeneratorFunction · 0.85
__asyncValuesFunction · 0.85
__awaitFunction · 0.85
fromMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…