MCPcopy Index your code
hub / github.com/angular/angular / stringifyNodes

Function stringifyNodes

packages/core/test/acceptance/control_flow_utils_spec.ts:380–393  ·  view source on GitHub ↗
(nodes: Node[])

Source from the content-addressed store, hash-verified

378 });
379
380 function stringifyNodes(nodes: Node[]): string[] {
381 return nodes.map((node) => {
382 switch (node.nodeType) {
383 case document.COMMENT_NODE:
384 return `Comment(${node.textContent?.trim()})`;
385 case document.ELEMENT_NODE:
386 return `Element(${node.nodeName.toLowerCase()}, ${node.textContent?.trim()})`;
387 case document.TEXT_NODE:
388 return `Text(${node.textContent?.trim()})`;
389 default:
390 throw new Error('Unsupported node. Function may need to be updated.');
391 }
392 });
393 }
394});
395
396describe('getControlFlowBlocks > @for blocks', () => {

Callers 1

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…