Advanced minify of javascript objects

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:


function MyApp(){
  /** @private */
  this.effect=0.2;

  this.var1="test";
  this.var2=34;
}

/**
 *
 */
MyApp.prototype.initialize = function() {
  // code here
}

/**
 * @private
 */
MyApp.prototype.print = function() {
  // code for private function here
}

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.

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

http://www.google.com/search?q=javascript+minify&aq=0&oq=javascript+minify

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.

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

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.