MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / findChildren

Function findChildren

packages/plugins/src/index.ts:509–514  ·  view source on GitHub ↗
(
  node: ContainerNode,
  query: NodeQuery
)

Source from the content-addressed store, hash-verified

507 * ```
508 */
509export function findChildren<T extends DesignNode = DesignNode>(
510 node: ContainerNode,
511 query: NodeQuery
512): T[] {
513 return node.children.filter((child) => matchNode(child, query)) as T[]
514}
515
516/**
517 * Depth-first search for the first node that matches the query.

Callers 2

index.test.tsFile · 0.90
queryAllFunction · 0.85

Calls 1

matchNodeFunction · 0.85

Tested by

no test coverage detected