MCPcopy
hub / github.com/jwngr/sdow / getWikipediaPageUrl

Function getWikipediaPageUrl

website/src/utils.ts:6–10  ·  view source on GitHub ↗
(pageTitle: string)

Source from the content-addressed store, hash-verified

4import wikipediaFacts from './resources/wikipediaFacts.json';
5
6export 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
12let unusedPageTitles: string[] = [];
13export const getRandomPageTitle = (): string => {

Callers 4

ResultsFunction · 0.90
ResultsGraphFunction · 0.90
LoadingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected