MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / concat

Function concat

packages/plugins/apps/src/source/app-source.test.ts:23–31  ·  view source on GitHub ↗
(parts: readonly Uint8Array[])

Source from the content-addressed store, hash-verified

21const textEncoder = new TextEncoder();
22
23const concat = (parts: readonly Uint8Array[]): Uint8Array => {
24 const out = new Uint8Array(parts.reduce((sum, part) => sum + part.length, 0));
25 let offset = 0;
26 for (const part of parts) {
27 out.set(part, offset);
28 offset += part.length;
29 }
30 return out;
31};
32
33const sideBand = (bytes: Uint8Array): Uint8Array => {
34 const chunks: Uint8Array[] = [pktLine("NAK\n")];

Callers 6

sideBandFunction · 0.70
advertisementFunction · 0.70
gitObjectIdFunction · 0.70
packFileFunction · 0.70
packedObjectFunction · 0.70
app-source.test.tsFile · 0.70

Calls 1

setMethod · 0.80

Tested by

no test coverage detected