vaderjs 1.3.3-alpha-26 → 1.3.3-alpha-28

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vader.js +6 -4
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "vaderjs",
3
3
  "description": "A Reactive library aimed to helping you build reactive applications inspired by react.js",
4
4
  "module": "vader.js",
5
- "version": "1.3.3-alpha-26",
5
+ "version": "1.3.3-alpha-28",
6
6
  "bin": {
7
7
  "vader": "./vader.js"
8
8
  },
package/vader.js CHANGED
@@ -98,8 +98,10 @@ function Compiler(func) {
98
98
  let ref = Math.random().toString(36).substring(2);
99
99
  let old = `${attributeName}${attributeValue}`;
100
100
 
101
- let newvalue =
102
- attributeValue.split("=>")[1] || attributeValue.split("=>")[1].trim();
101
+ //ex: (params)=>{console.log(params)} => console.log(params
102
+ // do not split all =>
103
+ let newvalue = attributeValue.split("=>").slice(1).join("=>").trim();
104
+
103
105
 
104
106
  newvalue = newvalue.trim();
105
107
 
@@ -181,9 +183,9 @@ function Compiler(func) {
181
183
  });
182
184
 
183
185
  if(isJSXComponent){
184
- continue
186
+ return
185
187
  }
186
- let replacement = `this.useFunction(${name},
188
+ let replacement = `this.useFunction(${name} ${isJSXComponent ? "" : ","
187
189
  } ${params || null}${isJSXComponent ? "" : ","} true ${isJSXComponent ? "" : ","
188
190
  } '${ref}')`;
189
191