V
V
Vitaly2016-11-20 19:19:58
JavaScript
Vitaly, 2016-11-20 19:19:58

Is it possible to protect js code from outside interference?

Angular 2 does a great job of protecting code by compiling logic and styles into bundled compressed files.
Simple browser JS can be compressed in the same way, making life difficult for outsiders.
Is there a similar solution for Node.js?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dark Hole, 2016-11-20
@vitali1995

The minifier and obuffscator are independent of the JS content. Those. what goes for minification/obfuscation of the "front" JS will also go for the "back"

S
sanex3339, 2016-11-21
@sanex3339

https://github.com/javascript-obfuscator/javascript...
API, CLI, web interface, whatever.
and a bunch of plugins for build systems https://github.com/javascript-obfuscator/

S
Sergey delphinpro, 2017-02-27
@mrzgt

var el = document.getElementById('col');
if (el) {
  el.classList.add('some-class');
}

var el = document.getElementById('col');
if (el) {
  var otherEl = document.getElementById('other-id');
  if (otherEl) {
    otherEl.classList.add('some-class');
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question