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
399 B
Raw Blame
/**
 * A path with one separator spelling and no trailing separator, so two
 * spellings of one path compare equal (`C:/repo/x` and `C:\repo\x`).
 *
 * @param path an absolute path as a walk or the model spelled it
 * @returns the path with `/` for every separator, no trailing one
 */
export const normalSpellingOf = (path: string): string =>
  path.replaceAll('\\', '/').replace(/(?<=.)\/+$/, '')