MCPcopy
hub / github.com/angular/components / flatten

Function flatten

src/cdk/tree/control/flat-tree-control.spec.ts:233–241  ·  view source on GitHub ↗
(nodes: TestData[], data: TestData[])

Source from the content-addressed store, hash-verified

231}
232
233function flatten(nodes: TestData[], data: TestData[]) {
234 for (let node of nodes) {
235 data.push(node);
236
237 if (node.children && node.children.length > 0) {
238 flatten(node.children, data);
239 }
240 }
241}

Callers 1

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…