docs/vendor.js
function toPercent(parsedNumber) {
    // if the number is 0, don't do anything
    if (parsedNumber.digits[0] === 0) {
        return parsedNumber;
    }
    // Getting the current number of decimals
    var fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;
    if (parsedNumber.exponent) {
        parsedNumber.exponent += 2;
    }
    else {
        if (fractionLen === 0) {
            parsedNumber.digits.push(0, 0);
        }
        else if (fractionLen === 1) {
            parsedNumber.digits.push(0);
        }
        parsedNumber.integerLen += 2;
    }
    return parsedNumber;
}
function toPercent(parsedNumber) {
    // if the number is 0, don't do anything
    if (parsedNumber.digits[0] === 0) {
        return parsedNumber;
    }
    // Getting the current number of decimals
    var fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;
    if (parsedNumber.exponent) {
        parsedNumber.exponent += 2;
    }
    else {
        if (fractionLen === 0) {
            parsedNumber.digits.push(0, 0);
        }
        else if (fractionLen === 1) {
            parsedNumber.digits.push(0);
        }
        parsedNumber.integerLen += 2;
    }
    return parsedNumber;
}
function toPercent ( parsedNumber ) { // if the number is 0, don't do anything if ( parsedNumber . digits [ 0 ] === 0 ) { return parsedNumber ; } // Getting the current number of decimals var fractionLen = parsedNumber . digits . length - parsedNumber . integerLen ; if ( parsedNumber . exponent ) { parsedNumber . exponent += 2 ; } else { if ( fractionLen === 0 ) { parsedNumber . digits . push ( 0 , 0 ) ; } else if ( fractionLen === 1 ) { parsedNumber . digits . push ( 0 ) ; } parsedNumber . integerLen += 2 ; } return parsedNumber ; }
Transforms a parsed number into a percentage by multiplying it by 100
Transforms a parsed number into a percentage by multiplying it by 100