src/js/painter/controller.js
function convertToNumber(value) {
    if (_.isString(value)) {
        value = value.replace(/,/g, '');
    }

    if (_.isNumber(value) || isNaN(value) || util.isBlank(value)) {
        return value;
    }

    return Number(value);
}
function convertToNumber(value) {
    if (_.isString(value)) {
        value = value.replace(/,/g, '');
    }

    if (_.isNumber(value) || isNaN(value) || util.isBlank(value)) {
        return value;
    }

    return Number(value);
}
function convertToNumber ( value ) { if ( _ . isString ( value ) ) { value = value . replace ( / , / g , '' ) ; } if ( _ . isNumber ( value ) || isNaN ( value ) || util . isBlank ( value ) ) { return value ; } return Number ( value ) ; }
Converts given value to a number type and returns it.
If the value is not a number type, returns the original value.
@param {*} value - value
@returns {*}
Converts given value to a number type and returns it . If the value is not a number type returns the original value .