You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am integrating duktape + handlebars.js in my C++ program and when I try to duk_peval this code I get an error on line 3:
'use strict'module.exports=(...args)=>{constnumArgs=args.lengthif(numArgs===3)returnargs[0]&&args[1]if(numArgs<3)thrownewError('{{and}} helper expects at least 2 arguments')args.pop()returnargs.every((it)=>it)}
I get that I need some modules extras/ from the repo, but I looked at the sources to duk_module_node.c and this doesn't affect the parser. Am I correct that duktape 2.7.0 cannot parse this syntax from above (specifically the module.exports = (...args))?
Or am I just confused... full disclosure I am by no means a JS expert. C++ is my primary language. So I do not understand modules that well.
Thanks for any replies!
The text was updated successfully, but these errors were encountered:
I am integrating duktape + handlebars.js in my C++ program and when I try to
duk_peval
this code I get an error on line 3:I get that I need some modules extras/ from the repo, but I looked at the sources to duk_module_node.c and this doesn't affect the parser. Am I correct that duktape 2.7.0 cannot parse this syntax from above (specifically the
module.exports = (...args)
)?Or am I just confused... full disclosure I am by no means a JS expert. C++ is my primary language. So I do not understand modules that well.
Thanks for any replies!
The text was updated successfully, but these errors were encountered: