vasille-jsx 4.1.0 → 4.2.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
@@ -35,6 +35,7 @@ $ npm create vasille
35
35
  ### Full documentation:
36
36
  * [Learn `Vasille` in 5 minutes](https://github.com/vasille-js/vasille-js/blob/v4/doc/V4-API.md)
37
37
  * [Vasille Router Documentation](https://github.com/vasille-js/vasille-js/blob/v4/doc/Router-API.md)
38
+ * [Vasille Compostion function](https://github.com/vasille-js/vasille-js/blob/v4/doc/Compositions.md)
38
39
 
39
40
  ### Examples
40
41
  * [TypeScript Example](https://github.com/vasille-js/example-typescript)
@@ -103,14 +104,18 @@ All of these are supported:
103
104
 
104
105
  ## Change log
105
106
 
106
- ### 4.0.0
107
+ ### 4.2.0
107
108
 
108
- Initial version of the framework with file based routing and building scripts (`vasille-web dev` and `vasille-web build spa`).
109
+ Add support for inlined conditions in JSX, binary `&&` and ternary `?:` operator.
109
110
 
110
- ## 4.1.0
111
+ ### 4.1.0
111
112
 
112
113
  Added SSG (static site generation) as build option `vasille-web build static`.
113
114
 
115
+ ### 4.0.0
116
+
117
+ Initial version of the framework with file based routing and building scripts (`vasille-web dev` and `vasille-web build spa`).
118
+
114
119
  ## Questions
115
120
 
116
121
  If you have questions, feel free to contact the maintainer of the project:
package/lib/internal.js CHANGED
@@ -49,7 +49,7 @@ export function ensure(data) {
49
49
  * 1. `{[a]: a1 = 3} = {x: 2}` to `{[a]: a1 = match("a1", 3)} = {x: 2}`
50
50
  */
51
51
  export function match(name, data) {
52
- const iValueRequired = name.startsWith("$");
52
+ const iValueRequired = typeof name === "string" && name.startsWith("$");
53
53
  const isIValue = data instanceof IValue;
54
54
  if (iValueRequired && !isIValue) {
55
55
  return new Reference(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vasille-jsx",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "The same framework which is designed to build bulletproof frontends (JSX components)",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -32,7 +32,7 @@ export declare function ensure(data: unknown): IValue<any>;
32
32
  * 1. `{[a]: a1} = {x: 2}` to `{[a]: a1 = match("a1")} = {x: 2}`
33
33
  * 1. `{[a]: a1 = 3} = {x: 2}` to `{[a]: a1 = match("a1", 3)} = {x: 2}`
34
34
  */
35
- export declare function match(name: string, data?: unknown): any;
35
+ export declare function match(name: string | number | symbol, data?: unknown): any;
36
36
  /**
37
37
  * Set a value of a field (alternative to proxies)
38
38
  * 1. `obj.$key = 23` to `set(obj, "$key", 23)`