classix 2.1.4 → 2.1.7

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
@@ -1,8 +1,10 @@
1
+ ![Banner](media/banner.jpg)
2
+
1
3
  # classix
2
4
 
3
- ![Build](https://img.shields.io/github/workflow/status/alexnault/classix/ci-and-publish?style=flat-square)
4
5
  ![NPM version](https://img.shields.io/npm/v/classix?style=flat-square)
5
- ![Size](https://img.shields.io/bundlephobia/minzip/classix?&style=flat-square)
6
+ ![Build](https://img.shields.io/github/workflow/status/alexnault/classix/ci-and-publish?style=flat-square)
7
+ ![Test coverage](https://img.shields.io/codecov/c/github/alexnault/classix?style=flat-square)
6
8
 
7
9
  The [fastest](#comparison) and [tiniest](#comparison) utility for conditionally joining classNames.
8
10
 
@@ -54,7 +56,7 @@ cx(
54
56
 
55
57
  ![Size comparison chart](media/size.png)
56
58
 
57
- Sources: [classix](https://bundlephobia.com/package/classix), [clsx](https://bundlephobia.com/package/clsx), [classnames](https://bundlephobia.com/package/classnames)
59
+ Sources: [classix](https://bundlejs.com/?q=classix), [clsx](https://bundlejs.com/?q=clsx), [classnames](https://bundlejs.com/?q=classnames)
58
60
 
59
61
  ![Performance comparison chart](media/perf.png)
60
62
 
@@ -75,7 +77,7 @@ cx(isPrimary && isLarge ? "class-1" : "class-2");
75
77
  - Zero dependencies
76
78
  - Fully typed (with TypeScript)
77
79
  - Fully tested
78
- - Follows [semantic versioning](https://semver.org/)
80
+ - [Semver](https://semver.org/) compliant
79
81
 
80
82
  ## Changelog
81
83
 
@@ -1,13 +1 @@
1
- function cx() {
2
- let str = "", i = 0, arg;
3
- while (i < arguments.length) {
4
- if ((arg = arguments[i++]) && typeof arg === "string") {
5
- str && (str += " ");
6
- str += arg;
7
- }
8
- }
9
- return str;
10
- }
11
-
12
- exports.cx = cx;
13
- exports["default"] = cx;
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,12 +1 @@
1
- function cx() {
2
- let str = "", i = 0, arg;
3
- while (i < arguments.length) {
4
- if ((arg = arguments[i++]) && typeof arg === "string") {
5
- str && (str += " ");
6
- str += arg;
7
- }
8
- }
9
- return str;
10
- }
11
-
12
- export { cx, cx as default };
1
+ function t(){let t,e="",n=0;for(;n<arguments.length;)(t=arguments[n++])&&"string"==typeof t&&(e&&(e+=" "),e+=t);return e}export{t as cx,t as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classix",
3
- "version": "2.1.4",
3
+ "version": "2.1.7",
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",
@@ -47,6 +47,7 @@
47
47
  "rollup": "^2.77.0",
48
48
  "rollup-plugin-dts": "^4.2.2",
49
49
  "rollup-plugin-esbuild": "^4.9.1",
50
+ "rollup-plugin-terser": "^7.0.2",
50
51
  "semantic-release": "^19.0.3",
51
52
  "size-limit": "^7.0.8",
52
53
  "ts-jest": "^28.0.0",