| 312 | }; |
| 313 | |
| 314 | const walk = node => { |
| 315 | if (!node || !Array.isArray(node.children)) { |
| 316 | return; |
| 317 | } |
| 318 | |
| 319 | for (const child of node.children) { |
| 320 | if (child.type === 'listItem') { |
| 321 | const entry = extractEntry(child); |
| 322 | if (entry) { |
| 323 | entries.push(entry); |
| 324 | } |
| 325 | } |
| 326 | walk(child); |
| 327 | } |
| 328 | }; |
| 329 | |
| 330 | walk(tree); |
| 331 | return entries; |
no test coverage detected