Skip to content

Commit 42bf238

Browse files
committed
chore: rearrange pkg keys
1 parent e85c5be commit 42bf238

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"version": "1.0.3",
44
"repository": "lukeed/clsx",
55
"description": "A tiny (199B) utility for constructing className strings conditionally.",
6-
"unpkg": "dist/clsx.min.js",
76
"module": "dist/clsx.m.js",
7+
"unpkg": "dist/clsx.min.js",
88
"main": "dist/clsx.js",
9+
"types": "clsx.d.ts",
910
"license": "MIT",
1011
"author": {
1112
"name": "Luke Edwards",
@@ -20,7 +21,6 @@
2021
"pretest": "npm run build",
2122
"test": "tape test/*.js | tap-spec"
2223
},
23-
"types": "clsx.d.ts",
2424
"files": [
2525
"*.d.ts",
2626
"dist"

src/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ function toVal(mix) {
22
var k, y, str='';
33
if (mix) {
44
if (typeof mix === 'object') {
5-
if (!!mix.push) {
6-
for (k=0; k < mix.length; k++) {
7-
if (mix[k] && (y = toVal(mix[k]))) {
8-
str && (str += ' ');
9-
str += y;
5+
if (!!mix.push) {
6+
for (k=0; k < mix.length; k++) {
7+
if (mix[k] && (y = toVal(mix[k]))) {
8+
str && (str += ' ');
9+
str += y;
10+
}
1011
}
11-
}
1212
} else {
13-
for (k in mix) {
14-
if (mix[k] && (y = toVal(k))) {
15-
str && (str += ' ');
16-
str += y;
13+
for (k in mix) {
14+
if (mix[k] && (y = toVal(k))) {
15+
str && (str += ' ');
16+
str += y;
17+
}
1718
}
1819
}
19-
}
2020
} else if (typeof mix !== 'boolean' && !mix.call) {
2121
str && (str += ' ');
2222
str += mix;

0 commit comments

Comments
 (0)