simple-merge-class-names 1.0.9 → 1.0.10
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 +17 -0
- package/package.json +14 -3
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ A straightforward utility for merging CSS class names in `React + Tailwind` and
|
|
|
12
12
|
- [Where This Package Excels](#where-this-package-excels)
|
|
13
13
|
- [Source Code](#source-code)
|
|
14
14
|
- [Argument Handling](#argument-handling)
|
|
15
|
+
- [Testing](#testing)
|
|
15
16
|
- [Production Considerations](#production-considerations)
|
|
16
17
|
- [License](#license)
|
|
17
18
|
|
|
@@ -123,6 +124,22 @@ export const mergeClassNames = (...args) => {
|
|
|
123
124
|
|
|
124
125
|
`mergeClassNames` accepts multiple arguments but filters out `null`, `undefined`, and empty strings (`""`). Remaining values are either strings or are _implicitly converted_ to strings by the JavaScript engine, then joined with spaces to produce the final class name string.
|
|
125
126
|
|
|
127
|
+
### Testing
|
|
128
|
+
|
|
129
|
+
This project uses `Vitest` as the test runner for fast, modern testing.
|
|
130
|
+
|
|
131
|
+
#### Run All Testing Once
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pnpm test
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### Run Tests In Watch Mode
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pnpm test:watch
|
|
141
|
+
```
|
|
142
|
+
|
|
126
143
|
## Production Considerations
|
|
127
144
|
|
|
128
145
|
If you are considering this package for production, you might also want to look into `clsx` for more advanced features: [https://www.npmjs.com/package/clsx](https://www.npmjs.com/package/clsx)
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-merge-class-names",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Example usage: <div className = {mergeClassNames('flex', 'flex-col')}/>",
|
|
5
5
|
"main": "mergeClassNames.js",
|
|
6
6
|
"exports": "./mergeClassNames.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"package.json",
|
|
9
|
+
"mergeClassNames.js",
|
|
10
|
+
"LICENSE.txt",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
7
13
|
"scripts": {
|
|
8
|
-
"test": "
|
|
14
|
+
"test": "vitest",
|
|
15
|
+
"test:watch": "vitest --watch",
|
|
16
|
+
"test:ui": "vitest --ui"
|
|
9
17
|
},
|
|
10
18
|
"keywords": [
|
|
11
19
|
"merge",
|
|
@@ -23,5 +31,8 @@
|
|
|
23
31
|
"bugs": {
|
|
24
32
|
"url": "https://github.com/new-AF/simple-merge-class-names/issues"
|
|
25
33
|
},
|
|
26
|
-
"homepage": "https://github.com/new-AF/simple-merge-class-names"
|
|
34
|
+
"homepage": "https://github.com/new-AF/simple-merge-class-names",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"vitest": "^3.2.3"
|
|
37
|
+
}
|
|
27
38
|
}
|