simple-merge-class-names 5.0.7 → 6.0.0

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
@@ -141,10 +141,6 @@ mergeClassNames: (...args: (string | false)[]) => string;
141
141
  mergeClassNamesDebugger: (...args: (string | false)[]) => string;
142
142
  ```
143
143
 
144
- ```jsx
145
- isEmptyString: (argument: string) => boolean;
146
- ```
147
-
148
144
  For both `mergeClassNames` and `mergeClassNamesDebugger` they always return a string.
149
145
 
150
146
  - If no inputs were provided e.g. `mergeClassNames()` or were invalid `mergeClassNames(undefined, " ")` then an _empty string_ is returned `""`
@@ -283,34 +279,6 @@ const MyComponent = () => {
283
279
  };
284
280
  ```
285
281
 
286
- - If chaining the result of another `mergeClassNames` then use `isEmptyString` to check if the result is not the _empty string_ (`""`):
287
-
288
- ```jsx
289
- import { mergeClassNames, isEmptyString } from "simple-merge-class-names";
290
-
291
- const MyComponent = ({ condition, resultOfAnotherMergeClassNames }) => {
292
- return (
293
- <div
294
- className={mergeClassNames(
295
- "app",
296
-
297
- condition ? "min-h-dvh" : false,
298
-
299
- isEmptyString(resultOfAnotherMergeClassNames)
300
- ? false
301
- : resultOfAnotherMergeClassNames,
302
-
303
- "grid",
304
- "grid-rows-[auto_1fr_auto]",
305
- "outline"
306
- )}
307
- >
308
- Hello, world!
309
- </div>
310
- );
311
- };
312
- ```
313
-
314
282
  ## Testing
315
283
 
316
284
  This project uses `Vitest` as the test runner for fast and modern testing.
@@ -41,7 +41,7 @@ const isValueFalse = (val) => val === false;
41
41
 
42
42
  const isTypeString = (val) => typeof val === "string";
43
43
 
44
- export const isEmptyString = (val) => {
44
+ const isEmptyString = (val) => {
45
45
  const trimmed = val.trim();
46
46
  return trimmed === "";
47
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-merge-class-names",
3
- "version": "5.0.7",
3
+ "version": "6.0.0",
4
4
  "description": "A straightforward utility for merging CSS class names in React + Tailwind and JavaScript projects.",
5
5
  "exports": {
6
6
  ".": {