Skip to content
CAI
Software that uses CAICheck a score

JedWatson/classnames

63.0

Adequate · 1 October 2026

204

lines of production code

JavaScript

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a JavaScript utility library for manipulating CSS class names, providing core functionality alongside specialized variants for binding classes in CSS Modules and deduplicating classes based on falsy values. It supports both CommonJS and ES Module environments, with comprehensive TypeScript definitions and a browser-based benchmarking suite for performance validation.

Features

Add \`bind\` and \`dedupe\` variants with TypeScript definitions

The library now ships with two additional entry points alongside the main \index.js\: a \dedupe\ variant that ensures classes are correctly excluded when overridden by falsy values in later arguments, and a \bind\ variant designed for use with CSS Modules to map logical class names to actual output values. Both variants include dedicated TypeScript declaration files (\dedupe.d.ts\ and \bind.d.ts\) and are documented in the updated README, which also includes new examples for React functional components and dynamic class names.

(repo-wide) · high confidence

Add browser-based benchmarking suite

The benchmarks directory now includes a new HTML interface and JavaScript entry points that allow users to run performance comparisons directly in a web browser. This suite uses the \tinybench\ library to compare local development builds against the published NPM package across various input scenarios (strings, objects, arrays, and mixed inputs) for default, bind, and dedupe modes, providing a visual table output via a 'Start benchmarks' button.

benchmarks · high confidence

Test coverage

Added unit and type tests for classNames, bind, and dedupe modules

Added comprehensive test suites for the main \classNames\, \bind\, and \dedupe\ entry points. The JavaScript tests (\tests/index.js\, \tests/bind.js\, \tests/dedupe.js\) verify runtime behavior including truthy/falsy handling, array recursion, \toString()\ method support, and CSS module binding. TypeScript definition tests (\tests/\*.test-d.ts\) validate the public API signatures using \tsd\, ensuring correct argument types and error cases.

tests · high confidence

Dependencies

Release classnames 2.5.1 with ESM support and updated build tooling

This release updates the classnames package to version 2.5.1, introducing native ES Module support via the "type": "module" field and explicit subpath exports for the main entry, bind, and dedupe modules. The build pipeline has been modernized by replacing Browserify with Rollup and its associated plugins (commonjs, json, node-resolve), and the benchmarking tool has been switched from benchmark to tinybench. TypeScript type checking is now handled by tsd, and a package-lock.json file has been added to ensure deterministic dependency resolution.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 62 → 63 (+1.1)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 80 → 80 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 55 → 55 (+0.0)
  • Readiness 62 → 62 (+0.6)
  • Security 78 → 83 (+4.3)
  • Performance 94 (new)

Resolved (1)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)

New (1)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile resolved no direct production dependency)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

JedWatson/classnames was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit abd6314010de053a09df5acc53e474ff65cea470 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.