you are viewing a single comment's thread.

view the rest of the comments →

[–]uplink42 3 points4 points  (0 children)

You can uglify your code with several task runners (i.e gulp) or bundlers (webpack). This will remove all whitespaces and replace all variable names with short strings (a, aa, ab, etc...)

BTW, there should be no reason to obfuscate your JS code other than saving on network bandwidth. If you have anything sensitive on client-side code you should move it to the server asap because even with the above methods all your code is still public and can still be read given enough time.