ctx-core 6.5.2 → 6.5.3

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.
@@ -4,15 +4,14 @@
4
4
  * @returns {string}
5
5
  * @example
6
6
  * class_({class_1: true, html_class__: false, class_3: true}) // returns 'class_1 class_3'
7
+ * @see https://github.com/ctx-core/html
7
8
  * @see https://github.com/lukeed/clsx
8
9
  */
9
10
  export function html_class_(...class_def_a) {
10
11
  let a = []
11
- for (let class_def of class_def_a) {
12
+ for (let class_def of class_def_a.flat(Infinity)) {
12
13
  if (typeof class_def === 'string') {
13
14
  a.push(class_def)
14
- } else if (Array.isArray(class_def)) {
15
- a.push(...class_def)
16
15
  } else if (typeof class_def === 'object') {
17
16
  for (let key in class_def) {
18
17
  if (class_def[key]) a.push(key)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-core",
3
- "version": "6.5.2",
3
+ "version": "6.5.3",
4
4
  "description": "ctx-core core library",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -393,7 +393,7 @@
393
393
  "import": {
394
394
  "./html": "{ class_ }"
395
395
  },
396
- "limit": "101 B"
396
+ "limit": "94 B"
397
397
  },
398
398
  {
399
399
  "name": "uuid_",