Comparing version 0.1.0 to 0.1.1
# Changelog | ||
## 2022-04-04, v0.1.1 | ||
* 🩹 `classNames()` accepts arrays. | ||
## 2022-03-21, v0.1.0 | ||
* 🎉 Initial release with `classNames()`. |
@@ -1,1 +0,1 @@ | ||
export declare function classNames(...args: (string | undefined)[]): string; | ||
export declare function classNames(...args: (string | string[] | undefined)[]): string; |
@@ -0,4 +1,5 @@ | ||
import flatten from "lodash/flatten"; | ||
import identity from "lodash/identity"; | ||
export function classNames(...args) { | ||
return args.filter(identity).join(" "); | ||
return flatten(args).filter(identity).join(" "); | ||
} |
{ | ||
"name": "@warmsea/h", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Reusable utilities for web", | ||
@@ -9,12 +9,19 @@ "main": "lib/index.js", | ||
"license": "MIT", | ||
"files": [ | ||
"lib" | ||
], | ||
"scripts": { | ||
"lint": "o lint", | ||
"build": "o build --noPack", | ||
"test": "o test" | ||
"build": "o build", | ||
"test": "o test", | ||
"size": "size-limit" | ||
}, | ||
"o": { | ||
"presets": "reactlib" | ||
"presets": "weblib" | ||
}, | ||
"files": [ | ||
"lib" | ||
"size-limit": [ | ||
{ | ||
"path": "lib/index.js", | ||
"limit": "10 KB" | ||
} | ||
], | ||
@@ -25,7 +32,9 @@ "dependencies": { | ||
"devDependencies": { | ||
"@size-limit/preset-small-lib": "^7.0.8", | ||
"@types/jest": "^27.4.1", | ||
"@types/lodash": "^4.14.180", | ||
"@warmsea/o": "~0.0.8" | ||
"@warmsea/o": "^0.0.10", | ||
"size-limit": "^7.0.8" | ||
}, | ||
"sideEffects": false | ||
} |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2289
8
5