MCPcopy
hub / github.com/github/docs / findPage

Function findPage

script/update-internal-links.js:195–210  ·  view source on GitHub ↗
(tryPath, pageMap, redirects)

Source from the content-addressed store, hash-verified

193}
194
195function findPage(tryPath, pageMap, redirects) {
196 if (pageMap[tryPath]) {
197 return {
198 title: pageMap[tryPath].title,
199 path: tryPath,
200 }
201 }
202
203 const redirect = getRedirect(tryPath, { redirects, pages: pageMap })
204 if (pageMap[redirect]) {
205 return {
206 title: pageMap[redirect].title,
207 path: redirect,
208 }
209 }
210}

Callers 1

mainFunction · 0.70

Calls 1

getRedirectFunction · 0.50

Tested by

no test coverage detected