Hello,
thanks for this great library. Here's a (potential) bug I have found:
function mwe({ var1 = true } = { var1: false }) {
console.log(var1);
}
Trying to run the reflector on this function gives me the error
VM1240:5 Uncaught SyntaxError: Unexpected token =
at new Function (<anonymous>)
at betterEval (parameter-parser.js:31)
at ParameterParser.pushBuffer (parameter-parser.js:190)
at ParameterParser.parse (parameter-parser.js:140)
at reflector (index.js:9)
[…]
It is worth noting that function mwe({ var1 = true }) works and gives the correct result (destructuring argument with default value for var1), while function mwe({ var1 } = { var1: false }) does not cause an error but does not produce the expected result either (no destructuring parameter detected).
I'm not too familar with the JS/ECMA specifications, so if this is syntax you do not plan to support then sorry for bringing it up.
Hello,
thanks for this great library. Here's a (potential) bug I have found:
Trying to run the reflector on this function gives me the error
It is worth noting that
function mwe({ var1 = true })works and gives the correct result (destructuring argument with default value for var1), whilefunction mwe({ var1 } = { var1: false })does not cause an error but does not produce the expected result either (no destructuring parameter detected).I'm not too familar with the JS/ECMA specifications, so if this is syntax you do not plan to support then sorry for bringing it up.