getValueOfUnit = function (unit) {
    unit = unit ? unit.toLowerCase() : 'ether';
    var unitValue = unitMap[unit];
    if (unitValue === undefined) {
        throw new Error('This unit doesn\'t exists, please use the one of the following units' + JSON.stringify(unitMap, null, 2));
    }
    return new BigNumber(unitValue, 10);
}
Returns value of unit in Wei

@method getValueOfUnit
@param {String} unit the unit to convert to, default ether
@returns {BigNumber} value of the unit (in Wei)
@throws error if the unit is not correct:w