MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / topLevelNodes

Function topLevelNodes

src/utils/renderers/path-tree.ts:140–147  ·  view source on GitHub ↗
(root: PathTreeNode)

Source from the content-addressed store, hash-verified

138}
139
140function topLevelNodes(root: PathTreeNode): PathTreeNode[] {
141 const children = [...root.children.values()];
142 const onlyChild = children.length === 1 ? children[0] : undefined;
143 if (onlyChild && onlyChild.name === '/' && onlyChild.children.size > 1) {
144 return [...onlyChild.children.values()];
145 }
146 return children;
147}
148
149export function formatPathTree(
150 entries: readonly PathTreeEntry[],

Callers 1

formatPathTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected