Js2Py
Js2Py copied to clipboard
Getting JsException
getting this exception when I use translate_file:
Exception message: js2py.internals.simplex.JsException: SyntaxError: Line 3: Unexpected token .
js code:
function dedupe (arr) {
const result = []
arr?.forEach(x => {
if (!result.find(y => Object.keys(x).length === Object.keys(y).length && Object.entries(x).every(([k,ex]) => y[k] === ex ))) {
result.push(x)
}
})
return result
}