You need to sign in or sign up before continuing.
Bump clsx from 2.0.0 to 2.1.0
Bumps clsx from 2.0.0 to 2.1.0.
Release notes
Sourced from clsx's releases.
v2.1.0
Features
Add new
clsx/lite
submodule forstring
-only usage: 1a49142This is a 140b version of
clsx
that is ideal for Tailwind and/or React contexts, which typically follow thisclsx
usage pattern: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 forclsx
itself!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
v2.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
withc8
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
Commits
-
a60db12
2.1.0 -
1a49142
feat: addclsx/lite
module -
5cac14c
2.0.1 -
855eec2
chore(bench): include ≠ symbol -
bf64e71
chore: update module size -
6e3b2b9
chore: update benchmarks; -
554ad31
chore: dedicated string vs number var usage; -
deff09b
chore: cache arguments/array lengths (#26) -
6e2468e
fix(ci): replace nyc -> c8 -
308a238
chore(ci): update node matrix - Additional commits viewable in compare view