classix 2.1.13 → 2.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -90,6 +90,24 @@ Sources: Ran [benchmark](benchmark/) on an AMD Ryzen 5 5600x.
90
90
  - Fully tested
91
91
  - [Semver](https://semver.org/) compliant
92
92
 
93
+ ## Migrating to classix
94
+
95
+ If you are using `classnames` or `clsx`, you can migrate to `classix` by changing your `imports`:
96
+
97
+ ```diff
98
+ - import classnames from 'classnames';
99
+ + import cx from 'classix';
100
+ ```
101
+
102
+ And if you were using object arguments, you'll have to convert them to string arguments:
103
+
104
+ ```diff
105
+ - classnames({ 'class-1': cond });
106
+ + cx(cond && 'class-1')
107
+ ```
108
+
109
+ That's it!
110
+
93
111
  ## Changelog
94
112
 
95
113
  For a list of changes and releases, see the [changelog](https://github.com/alexnault/classix/releases).
@@ -1 +1 @@
1
- function t(){let t,e="",r=0;for(;r<arguments.length;)(t=arguments[r++])&&"string"==typeof t&&(e&&(e+=" "),e+=t);return e}exports.cx=t,exports.default=t;
1
+ function e(){let e,t="",r=0;for(;r<arguments.length;)(e=arguments[r++])&&"string"==typeof e&&(t&&(t+=" "),t+=e);return t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.cx=e,exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classix",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "The fastest and tiniest utility for conditionally joining classNames.",
5
5
  "main": "dist/cjs/classix.js",
6
6
  "module": "dist/esm/classix.js",