MCPcopy Create free account
hub / github.com/markdoc/markdoc / walkWithParents

Function walkWithParents

src/validator.ts:299–306  ·  view source on GitHub ↗
(
  node: Node,
  parents: Node[] = []
)

Source from the content-addressed store, hash-verified

297}
298
299export function* walkWithParents(
300 node: Node,
301 parents: Node[] = []
302): Generator<[Node, Node[]]> {
303 yield [node, parents];
304 for (const child of [...Object.values(node.slots), ...node.children])
305 yield* walkWithParents(child, [...parents, node]);
306}
307
308function hasValidLocation(
309 error: ValidationError

Callers 1

validateTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected