simple-merge-class-names 1.0.7 → 1.0.9
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 -4
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
A straightforward utility for merging CSS class names in `React + Tailwind` and other JavaScript projects.
|
|
4
4
|
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Install Prettier With VSCode (Most Recommended)](#install-prettier-with-vscode-most-recommended)
|
|
9
|
+
- [Usage](#usage)
|
|
10
|
+
- [Workflow To Minimize Typing Strain](#workflow-to-minimize-typing-strain)
|
|
11
|
+
- [Why the Mismatch Between Exported Function and Package Name?](#why-the-mismatch-between-exported-function-and-package-name)
|
|
12
|
+
- [Where This Package Excels](#where-this-package-excels)
|
|
13
|
+
- [Source Code](#source-code)
|
|
14
|
+
- [Argument Handling](#argument-handling)
|
|
15
|
+
- [Production Considerations](#production-considerations)
|
|
16
|
+
- [License](#license)
|
|
17
|
+
|
|
5
18
|
## Installation
|
|
6
19
|
|
|
7
20
|
```bash
|
|
@@ -16,7 +29,7 @@ yarn add simple-merge-class-names
|
|
|
16
29
|
npm install simple-merge-class-names
|
|
17
30
|
```
|
|
18
31
|
|
|
19
|
-
|
|
32
|
+
### Install `Prettier` With VSCode (Most Recommended)
|
|
20
33
|
|
|
21
34
|
[https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
|
|
22
35
|
|
|
@@ -58,7 +71,7 @@ function MyComponent() {
|
|
|
58
71
|
}
|
|
59
72
|
```
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
### Workflow To Minimize Typing Strain
|
|
62
75
|
|
|
63
76
|

|
|
64
77
|
|
|
@@ -106,7 +119,7 @@ export const mergeClassNames = (...args) => {
|
|
|
106
119
|
};
|
|
107
120
|
```
|
|
108
121
|
|
|
109
|
-
|
|
122
|
+
### Argument Handling
|
|
110
123
|
|
|
111
124
|
`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.
|
|
112
125
|
|
|
@@ -118,4 +131,4 @@ If you are considering this package for production, you might also want to look
|
|
|
118
131
|
|
|
119
132
|
This project is licensed under the AGPL-3.0 License. See `LICENSE.txt` for full details.
|
|
120
133
|
|
|
121
|
-
|
|
134
|
+
Enjoy 😉
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-merge-class-names",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Example usage: <div className = {mergeClassNames('flex', 'flex-col')}/>",
|
|
5
5
|
"main": "mergeClassNames.js",
|
|
6
6
|
"exports": "./mergeClassNames.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
9
|
},
|
|
10
|
-
"keywords": [
|
|
10
|
+
"keywords": [
|
|
11
|
+
"merge",
|
|
12
|
+
"class-names-merger",
|
|
13
|
+
"utility",
|
|
14
|
+
"react",
|
|
15
|
+
"tailwindcss"
|
|
16
|
+
],
|
|
11
17
|
"author": "Abdullah Fatota",
|
|
12
18
|
"license": "AGPL-3.0",
|
|
13
19
|
"repository": {
|