| 306 | }; |
| 307 | |
| 308 | const walk = node => { |
| 309 | if (!node || !Array.isArray(node.children)) { |
| 310 | return; |
| 311 | } |
| 312 | |
| 313 | for (const child of node.children) { |
| 314 | if (child.type === 'listItem') { |
| 315 | const entry = extractEntry(child); |
| 316 | if (entry) { |
| 317 | entries.push(entry); |
| 318 | } |
| 319 | } |
| 320 | walk(child); |
| 321 | } |
| 322 | }; |
| 323 | |
| 324 | walk(tree); |
| 325 | return entries; |
no test coverage detected