MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / isImageFilePath

Function isImageFilePath

src/utils/imagePaste.ts:333–337  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

331 * @returns Boolean indicating if text is an image path
332 */
333export function isImageFilePath(text: string): boolean {
334 const cleaned = removeOuterQuotes(text.trim())
335 const unescaped = stripBackslashEscapes(cleaned)
336 return IMAGE_EXTENSION_REGEX.test(unescaped)
337}
338
339/**
340 * Clean and normalize a text string that might be an image file path

Callers 2

usePasteHandlerFunction · 0.85
wrappedOnInputFunction · 0.85

Calls 2

removeOuterQuotesFunction · 0.85
stripBackslashEscapesFunction · 0.85

Tested by

no test coverage detected