Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting JsException #316

Open
SantiiRepair opened this issue Aug 24, 2023 · 0 comments
Open

Getting JsException #316

SantiiRepair opened this issue Aug 24, 2023 · 0 comments

Comments

@SantiiRepair
Copy link

SantiiRepair commented Aug 24, 2023

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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant