MCPcopy
hub / github.com/midrender/revideo / parseChildren

Method parseChildren

packages/2d/src/lib/components/Node.ts:1316–1326  ·  view source on GitHub ↗

* Parse any `ComponentChildren` into an array of nodes. * * @param children - The children to parse.

(children: ComponentChildren)

Source from the content-addressed store, hash-verified

1314 * @param children - The children to parse.
1315 */
1316 protected parseChildren(children: ComponentChildren): Node[] {
1317 const result: Node[] = [];
1318 const array = Array.isArray(children) ? children : [children];
1319 for (const child of array) {
1320 if (child instanceof Node) {
1321 result.push(child);
1322 }
1323 }
1324
1325 return result;
1326 }
1327
1328 /**
1329 * Remove the given child.

Callers 1

spawnChildrenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected