Minified variables inside function block

Feb 10, 2013 at 8:35 AM
I like to ask if this minification of names is possible ether with some kind of switch, ether with some kind of variable encoding.

Now if I have this:
function OriCar(UseA, UseB)
{
    this.OneVariable = UseA;
    this.TwoVariable = UseB;

    this.FunctionName = function(variableA) 
    {
        this.OneVariable = variableA;
        this.TwoVariable = variableA;
    }
}
Correct minified to this:
function OriCar(a, b)
{
    this.OneVariable = a;
    this.TwoVariable = b;

    this.FunctionName = function(c) 
    {
        this.OneVariable = c;
        this.TwoVariable = c;
    }
}
But it is possible to get this results (with also some of the inside variables minified (shorted names) if I am not use them out side ?:
function OriCar(a, b)
{
    // select this to minified
    this.a1 = a;
    // and not this
    this.TwoVariable = b;

    this.FunctionName = function(c) 
    {
        this.a1 = c;
        this.TwoVariable = c;
    }
}
or to this:
function OriCar(a, b)
{
    this.a1 = a;
    this.b1 = b;

    this.FunctionName = function(c) 
    {
        this.a1 = c;
        this.b1 = c;
    }
}
Coordinator
Feb 15, 2013 at 8:30 PM
It's possible to use the -rename switch to manually rename those values. For instance, -rename:OneVariable=a1,TwoVariable=b1 should get you the desired results above. But there's no automatic renaming of property names as of yet. You'll have to either specify them on the command line or through a renaming XML file (specified as -rename NFILE on the command line).
Mar 1, 2013 at 8:55 PM
Thank you for the answer, is works.

I am use direct the dll on the program, so I use the RenamePairs parameter to set that pairs.