Skip to content
CAI
Software that uses CAICheck a score

JedWatson/classnames

57.5

Adequate · 15 November 2026

204

lines of production code

JavaScript

primary language

5

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 60 → 58 (-2.7)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 81 → 58 (-23.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 50 → 50 (+0.0)
  • Readiness 62 → 62 (-0.1)
  • Security 77 → 77 (+0.0)
  • Performance 94 → 94 (+0.0)

New (6)

  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • Low CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)

Written by cca.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 15 November 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.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.