Clsx

Latest version: v0.1.1

Safety actively analyzes 723359 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

10.13.0

Strings
clsx (prev) x 10,336,101 ops/sec ±1.45% (90 runs sampled)
clsx x 11,191,101 ops/sec ±0.51% (97 runs sampled)

Objects
clsx (prev) x 7,195,049 ops/sec ±0.35% (92 runs sampled)
clsx x 7,133,215 ops/sec ±0.31% (93 runs sampled)

Arrays
clsx (prev) x 8,265,223 ops/sec ±0.32% (94 runs sampled)
clsx x 8,346,704 ops/sec ±0.29% (98 runs sampled)

Nested Arrays
clsx (prev) x 6,244,513 ops/sec ±1.41% (94 runs sampled)
clsx x 6,324,445 ops/sec ±0.38% (95 runs sampled)

Nested Arrays w/ Objects
clsx (prev) x 5,157,630 ops/sec ±0.34% (92 runs sampled)
clsx x 6,349,877 ops/sec ±0.26% (97 runs sampled)

Mixed
clsx (prev) x 5,751,180 ops/sec ±0.38% (95 runs sampled)
clsx x 6,722,160 ops/sec ±0.36% (98 runs sampled)

Mixed (Bad Data)
clsx (prev) x 1,935,973 ops/sec ±0.19% (97 runs sampled)
clsx x 2,053,230 ops/sec ±0.27% (95 runs sampled)

2.1.1

Patches

* (types) Include `bigint` in `ClassValue` type: (96): 3d960ab
_Accommodates recent `types/react` changes to `ReactNode`._
_Thank you ViliamKopecky~!_

Chores

- Add [`licenses.dev`](https://licenses.dev) badge: 684509c
_This service recursively analyzes entire dependency graphs to ensure that a package (or your project) is using permissive licenses. For example, here's a results table for [`polkanext`](https://licenses.dev/npm/polka/1.0.0-next.24) and a larger [`astro`](https://licenses.dev/npm/astro) example._

---

> **Full Changelog**: https://github.com/lukeed/clsx/compare/v2.1.0...v2.1.1

2.1.0

Features

- Add new `clsx/lite` submodule for `string`-only usage: 1a49142

_This is a **140b** version of `clsx` that is ideal for Tailwind and/or React contexts, which typically follow this `clsx` usage pattern:_

js
clsx('foo bar', props.maybe && 'conditional classes', props.className);


> **Important:** This `clsx/lite` module **ignores all non-string arguments** and is therefore not a 1:1 replacement for `clsx` itself!

js
import { clsx } from 'clsx';
import { clsx as lite } from 'clsx/lite';

// strings-only usage is identical
clsx('foo', null, 'bar', true && 'baz'); //=> "foo bar baz"
lite('foo', null, 'bar', true && 'baz'); //=> "foo bar baz"

// clsx/lite ignores all non-strings
clsx('foo', { a: true, b: false, c: true }); //=> "foo a c"
lite('foo', { a: true, b: false, c: true }); //=> "foo"


---

> **Full Changelog**: https://github.com/lukeed/clsx/compare/v2.0.1...v2.1.0

2.0.1

Patches

- (perf) Cache `arguments.length` & `array.length` for 6% performance gain (26): deff09b
_Adds 5 bytes (+2%) for ~3% avg performance gain_
_Thank you jalalazimi_

Chores

- Update module size: bf64e71
- Update benchmark results: 855eec2, 6e3b2b9,
- Replace `nyc` with `c8` in CI: 6e2468e
- Update Node CI matrix: 308a238
- Fix readme typos (76, 82): 42354d3, 4c9a55d
_Thank you andipaetzold and acusti_

---

> **Full Changelog**: https://github.com/lukeed/clsx/compare/v2.0.0...v2.0.1

2.0.0

Breaking

- Add `"exports"` map for native ESM support (57): 3ec8e9f, 0949868
_Also supports TypeScript's `node16`/`nodenext` module resolution_
_Maintains CommonJS support (with fixed TS definitions)_
_Thank you remcohaszing~!_

Chores

* Add [Tailwind Support](https://github.com/lukeed/clsx#tailwind-support) section to README (65, 68): 496db1d, 4a4eadd
_Thank you kevinlowe0x3F7 & kevinlowe0x3F7_
* Add tests for numbers & variadic number arguments: c520353
* Update package module size: 03e1cf9

---

> **Full Changelog**: https://github.com/lukeed/clsx/compare/v1.2.1...v2.0.0

1.2.1

Patches

- Ensure CommonJS and UMD entrypoints have the named `clsx` export too

Chores

- Build CJS & UMD files manually (50): 3712966, 2114f5b

---

> **Full Changelog**: https://github.com/lukeed/clsx/compare/v1.2.0...v1.2.1

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.