I have to map units coming from files send by customer to c3 units. currently I use a custom transform like this

```
function findUnits(xxxUnit){
var unit,index;
var YYYY =['kVArh','kg','h','kWh','l','¬∞C','%','m/s2','kg/h','A','V','s','mbar','bar','kW','Hz','mdeg','cm','rpm','ltr/h','kV','kVAr','cSt','l/min','g/kg','m¬≥','MW','MVAr','mm','g/kWh','hPa','MJ/kg'];
var c3units =['kvarh','kilogram','hour','kilowatt_hour','litre','degrees_celcius','percent','kg-per-m2','kg_per_hr','ampere','volt','second','bar','bar','kilowatt','hertz','dimensionless','centimeter','rpm','l_per_hr','kilovolt','kvar','dimensionless','litre-per-min','g-per-kg','dimensionless','megawatt','dimensionless','milimeter','g_per_kwh','hectopascal','MJ_per_kg'];
index = YYYY.indexOf(xxxUnit);
return index > 0 ? c3units[index] : 'dimensionless';
}
```

I am wondering if a) there is a better way of doing this and b) if this can be done in standard transform by declaring an enum type before