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
416 B
Raw Blame
import { keptOf } from '../../../kept-of'

/**
 * `+N -M` as diffStat draws it, as plain text: what a row measures to know
 * where its counts start; empty at 0/0.
 *
 * @param added lines added
 * @param removed lines removed
 * @returns the text
 */
export const statTextOf = (added: number, removed: number) =>
  keptOf([
    added > 0 ? `+${added}` : null,
    removed > 0 ? `-${removed}` : null,
  ]).join(' ')