MCPcopy Create free account
hub / github.com/Script-Hub-Org/Script-Hub / flattenChildren

Function flattenChildren

Rewrite-Parser.beta.js:3557–3567  ·  view source on GitHub ↗
(children)

Source from the content-addressed store, hash-verified

3555 }
3556
3557 function flattenChildren(children) {
3558 const result = []
3559 if (Array.isArray(children)) {
3560 children.forEach(child => {
3561 result.push(...flattenChildren(child))
3562 })
3563 } else if (children) {
3564 result.push(children)
3565 }
3566 return result
3567 }
3568 return traverseTree(node, platform)
3569}
3570

Callers 1

traverseTreeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected