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
285 B
Raw Blame
/**
 * A path with exactly one leading `/`, so a directory pattern like `/test/`
 * matches at the start of a relative path too.
 *
 * @param path the repository-relative path
 * @returns the rooted path
 */
export const rootedPathOf = (path: string) => `/${path.replace(/^\/+/, '')}`