MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / getGuideUrl

Function getGuideUrl

client/src/templates/Challenges/utils/index.ts:11–16  ·  view source on GitHub ↗
({ forumTopicId, title = '' }: GuideData)

Source from the content-addressed store, hash-verified

9}
10
11export function getGuideUrl({ forumTopicId, title = '' }: GuideData): string {
12 title = encodeURIComponent(title);
13 return forumTopicId
14 ? `https://forum.freecodecamp.org/t/${forumTopicId}`
15 : `${forumLocation}/search?q=${title}%20in%3Atitle%20order%3Aviews`;
16}
17
18export function isGoodXHRStatus(status?: string): boolean {
19 if (!status) return false;

Callers 4

index.test.tsFile · 0.90
ShowClassicFunction · 0.90
ShowFrontEndProjectFunction · 0.90
ShowBackEndFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected