MCPcopy Create free account
hub / github.com/FormidableLabs/react-live / walk

Function walk

packages/react-live/src/components/Editor/index.test.jsx:19–22  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

17const textNodes = (element) => {
18 const nodes = [];
19 const walk = (node) => {
20 if (node.nodeType === Node.TEXT_NODE) nodes.push(node);
21 node.childNodes.forEach(walk);
22 };
23 walk(element);
24 return nodes;
25};

Callers 1

textNodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected