(document, matcher)
| 5 | } |
| 6 | |
| 7 | async function posthtmlGetTextContent(document, matcher) { |
| 8 | let textContent; |
| 9 | |
| 10 | await posthtml([ |
| 11 | (tree) => { |
| 12 | tree.match(matcher, (node) => { |
| 13 | if (node.content) { |
| 14 | textContent = node.content.join(''); |
| 15 | } |
| 16 | return node; |
| 17 | }); |
| 18 | return tree; |
| 19 | }, |
| 20 | ]).process(document); |
| 21 | |
| 22 | return textContent; |
| 23 | } |
| 24 | |
| 25 | module.exports = { |
| 26 | getElementChildren, |
no outgoing calls
no test coverage detected