MCPcopy Index your code
hub / github.com/markdoc/markdoc / transform

Function transform

index.ts:77–87  ·  view source on GitHub ↗
(
  nodes: any,
  options?: C
)

Source from the content-addressed store, hash-verified

75 config?: C
76): RenderableTreeNode[];
77export function transform<C extends Config = Config>(
78 nodes: any,
79 options?: C
80): any {
81 const config = mergeConfig(options);
82 const content = resolve(nodes, config);
83
84 if (Array.isArray(content))
85 return content.flatMap((child) => child.transform(config));
86 return content.transform(config);
87}
88
89export function validate<C extends Config = Config>(
90 node: Node,

Callers 1

MarkdocClass · 0.70

Calls 3

mergeConfigFunction · 0.85
resolveFunction · 0.70
transformMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…