cradova 3.3.19 → 3.3.20

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/dist/index.js CHANGED
@@ -45,16 +45,16 @@ function $case(value, ...elements) {
45
45
  };
46
46
  }
47
47
  function $switch(key, ...cases) {
48
- let element;
48
+ let elements;
49
49
  if (cases.length) {
50
50
  for (let i = 0;i < cases.length; i++) {
51
- const elements = cases[i](key);
51
+ elements = cases[i](key);
52
52
  if (elements) {
53
53
  break;
54
54
  }
55
55
  }
56
56
  }
57
- return element;
57
+ return elements;
58
58
  }
59
59
  function loop(datalist, component) {
60
60
  return Array.isArray(datalist) ? datalist.map(component) : undefined;
@@ -11,7 +11,7 @@ export declare function Rhoda(l: VJS_params_TYPE<HTMLElement>): DocumentFragment
11
11
  export declare function $if<E>(condition: any, ...elements: VJS_params_TYPE<E>): any;
12
12
  export declare function $ifelse(condition: any, ifTrue: any, ifFalse?: any): any;
13
13
  export declare function $case<E = HTMLElement>(value: any, ...elements: VJS_params_TYPE<E>): (key: any) => VJS_params_TYPE<E> | undefined;
14
- export declare function $switch(key: unknown, ...cases: ((key: any) => any)[]): undefined;
14
+ export declare function $switch(key: unknown, ...cases: ((key: any) => any)[]): any;
15
15
  type LoopData<Type> = Type[];
16
16
  export declare function loop<Type>(datalist: LoopData<Type>, component: (value: Type, index?: number, array?: LoopData<Type>) => HTMLElement | DocumentFragment | undefined): HTMLElement[] | undefined;
17
17
  /** Calculate a simple numerical representation of the URL */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cradova",
3
- "version": "3.3.19",
3
+ "version": "3.3.20",
4
4
  "description": "Build Powerful ⚡ Web Apps with Ease",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",