| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 12c1ac4 commit 5fe7cfa
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,14 +18,11 @@ let apicontent = ''; | |||
| 18 | 18 | ||
| 19 | 19 | // Identify files that should be skipped. As files are processed, they | |
| 20 | 20 | // are added to this list to prevent dupes. | |
| 21 | - const seen = { | ||
| 22 | - 'all.html': true, | ||
| 23 | - 'index.html': true | ||
| 24 | - }; | ||
| 21 | + const seen = new Set(['all.html', 'index.html']); | ||
| 25 | 22 | ||
| 26 | 23 | for (const link of toc.match(/<a.*?>/g)) { | |
| 27 | 24 | const href = /href="(.*?)"/.exec(link)[1]; | |
| 28 | - if (!htmlFiles.includes(href) || seen[href]) continue; | ||
| 25 | + if (!htmlFiles.includes(href) || seen.has(href)) continue; | ||
| 29 | 26 | const data = fs.readFileSync(new URL(`./${href}`, source), 'utf8'); | |
| 30 | 27 | ||
| 31 | 28 | // Split the doc. | |
@@ -68,7 +65,7 @@ for (const link of toc.match(/<a.*?>/g)) { | |||
| 68 | 65 | .trim() + '\n'; | |
| 69 | 66 | ||
| 70 | 67 | // Mark source as seen. | |
| 71 | - seen[href] = true; | ||
| 68 | + seen.add(href); | ||
| 72 | 69 | } | |
| 73 | 70 | ||
| 74 | 71 | // Replace various mentions of index with all. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments