(docs)
| 58 | } |
| 59 | // 16. Normalize data |
| 60 | function normalizeData(docs) { |
| 61 | return JSON.parse(docs) |
| 62 | .filter((doc) => doc.title && doc.link && !doc.link.includes("brave.com")) |
| 63 | .slice(0, numberOfPagesToScan) |
| 64 | .map(({ title, link }) => ({ title, link })); |
| 65 | } |
| 66 | // 17. Fetch page content |
| 67 | const fetchPageContent = async (link) => { |
| 68 | console.log(`7. Fetching page content for ${link}`); |
no outgoing calls
no test coverage detected