(pageTitle: string)
| 4 | import wikipediaFacts from './resources/wikipediaFacts.json'; |
| 5 | |
| 6 | export const getWikipediaPageUrl = (pageTitle: string): string => { |
| 7 | const baseUrl = 'https://en.wikipedia.org/wiki/'; |
| 8 | const sanitizedPageTitle = pageTitle.replace(/ /g, '_'); |
| 9 | return `${baseUrl}${encodeURIComponent(sanitizedPageTitle)}`; |
| 10 | }; |
| 11 | |
| 12 | let unusedPageTitles: string[] = []; |
| 13 | export const getRandomPageTitle = (): string => { |
no outgoing calls
no test coverage detected