Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

169
Vistas
Compare two structurally similar JS files for equivalent functionality?

Is there a method to compare two javascript files for equivalent functionality? E.g.:

const foo = 1
console.log(foo)

and

const bar = 1
console.log(bar)

would be considered functionally equivalent.

I don't need to determine equivalence in all situations. Handling basic name changes is enough for my current use case (and probably solves most if not all future use cases).

My only thought is to maybe use a minifier with predictable naming obfuscation. Like, the first name encountered is always transliterated to v1, the 2nd to v2, etc. I realize I could create instrument a parser or something and could do that eventually, but I was hoping to find an existing solution.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I would recommend finding a code plagiarism tool like this one to check for similarity.

I know some people who found out that our Java 2 professor's tool could handle changing variable names, but I don't know what he used....

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda