I have developed an application in javascript, and my company wants to minify and obfuscate the code before we publish it on the webpage. The application is built as one javascript object with attributes and functions inside. Example, so that you can understand the structure:

Some of the functions are private, and so are some of the objects variables/attributes as well. I use JSDoc to mark them private, and NetBeans (the IDE I use) will mark them and treat them as private. The problem is that minifyers and iglyfiers will not abfuscate the private functions and variables/attributes. Only the local variables inside the functions are obfuscated.

Does anyone have a tip?

I hope to use yui compressor as my main tool for minifying.

force
—
2012-10-22T23:49:00Z —
#2

There's a whole slew of webapps that will minify javascript. Some--but not all--include obfuscation features.

There's a whole slew of webapps that will minify javascript. Some--but not all--include obfuscation features.

Short version of my question is: What application is able to obfuscate/minify the function names of private functions in an object? Do I have to change my code for that to be possible?

I have been googeling this without finding the answer.

Jeff_Mott
—
2012-10-23T19:27:41Z —
#4

Google's Closure Compiler using advanced compilation is probably your best bet. Though, yes, you will need to change you code.

force
—
2012-10-23T20:44:16Z —
#5

I've seen one tool that can obfuscate code which is inside functions and leave the function names and outside variables alone, but I can't remember what it was called. I just did a search and happened to stumble across it.