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
294 B
Raw Blame
/**
 * `1 file`, `2 files`: the count, a space, and the noun with an `s` unless
 * the count is one.
 *
 * @param count how many
 * @param noun the singular noun
 * @returns the phrase
 */
export const plural = (count: number, noun: string) =>
  count === 1 ? `1 ${noun}` : `${count} ${noun}s`