Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript
447 B
Raw Blame
import type { InstructionFile } from 'claude-code'

import { normalSpellingOf } from './normal-spelling-of.js'

/**
 * Whether an instruction file is the file at a path, however either is
 * spelled.
 *
 * @param file the instruction file
 * @param path an absolute path
 * @returns true when both name one path
 */
export const isFileAt = (file: InstructionFile, path: string): boolean =>
  normalSpellingOf(file.path) === normalSpellingOf(path)