classix 2.1.3 → 2.1.6

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,8 @@
1
1
  # classix
2
2
 
3
- ![Build](https://img.shields.io/github/workflow/status/alexnault/classix/ci-and-publish?style=flat-square)
4
3
  ![NPM version](https://img.shields.io/npm/v/classix?style=flat-square)
5
- ![Size](https://img.shields.io/bundlephobia/minzip/classix?&style=flat-square)
4
+ ![Build](https://img.shields.io/github/workflow/status/alexnault/classix/ci-and-publish?style=flat-square)
5
+ ![Test coverage](https://img.shields.io/codecov/c/github/alexnault/classix?style=flat-square)
6
6
 
7
7
  The [fastest](#comparison) and [tiniest](#comparison) utility for conditionally joining classNames.
8
8
 
@@ -54,7 +54,7 @@ cx(
54
54
 
55
55
  ![Size comparison chart](media/size.png)
56
56
 
57
- Sources: [classix](https://bundlephobia.com/package/classix), [clsx](https://bundlephobia.com/package/clsx), [classnames](https://bundlephobia.com/package/classnames)
57
+ Sources: [classix](https://bundlejs.com/?q=classix), [clsx](https://bundlejs.com/?q=clsx), [classnames](https://bundlejs.com/?q=classnames)
58
58
 
59
59
  ![Performance comparison chart](media/perf.png)
60
60
 
@@ -75,7 +75,7 @@ cx(isPrimary && isLarge ? "class-1" : "class-2");
75
75
  - Zero dependencies
76
76
  - Fully typed (with TypeScript)
77
77
  - Fully tested
78
- - Follows [semantic versioning](https://semver.org/)
78
+ - [Semver](https://semver.org/) compliant
79
79
 
80
80
  ## Changelog
81
81
 
@@ -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.3",
3
+ "version": "2.1.6",
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",
@@ -29,6 +29,7 @@
29
29
  "files": [
30
30
  "dist"
31
31
  ],
32
+ "sideEffects": false,
32
33
  "devDependencies": {
33
34
  "@size-limit/preset-small-lib": "^7.0.8",
34
35
  "@types/jest": "^28.0.0",
@@ -46,6 +47,7 @@
46
47
  "rollup": "^2.77.0",
47
48
  "rollup-plugin-dts": "^4.2.2",
48
49
  "rollup-plugin-esbuild": "^4.9.1",
50
+ "rollup-plugin-terser": "^7.0.2",
49
51
  "semantic-release": "^19.0.3",
50
52
  "size-limit": "^7.0.8",
51
53
  "ts-jest": "^28.0.0",