Js2Py icon indicating copy to clipboard operation
Js2Py copied to clipboard

Getting JsException

Open SantiiRepair opened this issue 2 years ago • 0 comments

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
}

SantiiRepair avatar Aug 24 '23 02:08 SantiiRepair