MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / walk

Function walk

packages/sdk/src/document.ts:245–248  ·  view source on GitHub ↗
(el: HyperFramesElement)

Source from the content-addressed store, hash-verified

243export function flatElements(roots: readonly HyperFramesElement[]): HyperFramesElement[] {
244 const result: HyperFramesElement[] = [];
245 function walk(el: HyperFramesElement) {
246 result.push(el);
247 for (const child of el.children) walk(child);
248 }
249 for (const root of roots) walk(root);
250 return result;
251}

Callers 1

flatElementsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected