MCPcopy Create free account
hub / github.com/d1ll0n/stack-packer / getChunk

Function getChunk

src/code-gen/codegen-helpers.ts:126–139  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

124 const positionedFields: string[] = fields.map((f) => f.positioned);
125 const lastIndex = positionedFields.length - 1;
126 const getChunk = (index: number) => {
127 if (index < lastIndex) {
128 const nextChunk = getChunk(index + 1);
129 return [
130 "or(",
131 [
132 `${positionedFields[index]},`,
133 ...(Array.isArray(nextChunk) ? nextChunk : [nextChunk]),
134 ],
135 `)`,
136 ];
137 }
138 return positionedFields[index];
139 };
140 return toArray(getChunk(0));
141}

Callers 1

buildNestedAssemblyOrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected