(file)
| 7 | |
| 8 | const result = []; |
| 9 | async function getVersionsFromFile(file) { |
| 10 | const input = fs.createReadStream(file); |
| 11 | let toc = false; |
| 12 | for await (const line of createInterface({ |
| 13 | input, |
| 14 | crlfDelay: Infinity, |
| 15 | })) { |
| 16 | if (toc === false && line === '<table>') { |
| 17 | toc = true; |
| 18 | } else if (toc && line[0] !== '<') { |
| 19 | input.close(); |
| 20 | return; |
| 21 | } else if (toc && line.startsWith('<a')) { |
| 22 | result.push(line.slice(line.indexOf('>') + 1, -'</a><br/>'.length)); |
| 23 | } else if (toc && line.startsWith('<b><a')) { |
| 24 | result.push(line.slice(line.indexOf('>', 3) + 1, -'</a></b><br/>'.length)); |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | const filesToCheck = []; |
| 30 |
no test coverage detected