MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isImageFilePath

Function isImageFilePath

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

Source from the content-addressed store, hash-verified

322 * @returns Boolean indicating if text is an image path
323 */
324export function isImageFilePath(text: string): boolean {
325 const cleaned = removeOuterQuotes(text.trim())
326 const unescaped = stripBackslashEscapes(cleaned)
327 return IMAGE_EXTENSION_REGEX.test(unescaped)
328}
329
330/**
331 * 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