MCPcopy Index your code
hub / github.com/labring/FastGPT / routeExists

Function routeExists

document/script/checkDocRefs.js:61–71  ·  view source on GitHub ↗
(basePath)

Source from the content-addressed store, hash-verified

59}
60
61function routeExists(basePath) {
62 const candidates = [
63 basePath + '.mdx',
64 basePath + '.en.mdx',
65 basePath + '.md',
66 path.join(basePath, 'index.mdx'),
67 path.join(basePath, 'index.en.mdx'),
68 path.join(basePath, 'index.md')
69 ];
70 return candidates.some(fileExists);
71}
72
73function isExternal(url) {
74 return /^(https?:|mailto:|tel:|data:|ftp:|ws:|wss:)/i.test(url) || url.startsWith('#');

Callers 1

isValidRefFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected