Hint: use something like
var DEV = true;
(function() {
var priv = function() {};
if(DEV)
this.priv = priv;
})();
and then use Closure Compiler with option:
--define DEV=false