MCPcopy Create free account
hub / github.com/backnotprop/plannotator / isCodeFilePath

Function isCodeFilePath

packages/shared/code-file.ts:33–37  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

31}
32
33export function isCodeFilePath(input: string): boolean {
34 if (!isPlausibleCodeFilePath(input)) return false;
35 return CODE_FILE_REGEX.test(stripLineRef(input))
36 && !input.startsWith('http://') && !input.startsWith('https://');
37}
38
39export function isCodeFilePathStrict(input: string): boolean {
40 return input.includes('/') && isCodeFilePath(input);

Callers 8

code-file.test.tsFile · 0.90
InlineMarkdownFunction · 0.90
rewriteRelativeRefsFunction · 0.90
configureServerFunction · 0.90
isCodeFilePathStrictFunction · 0.85
handleDocFunction · 0.85
handleDocRequestFunction · 0.85

Calls 2

isPlausibleCodeFilePathFunction · 0.85
stripLineRefFunction · 0.85

Tested by

no test coverage detected