src/util.js
function coerceNumber(value) {
    if (typeof value === 'number') {
        return value;
    }

    let isfloat = /^\d*(\.|,)\d*$/;

    if (isfloat.test(value)) {
        value = value.replace(',', '.');
    }

    let numberValue = Number(value);
    return numberValue == value || !value ? numberValue : value
}
function coerceNumber(value) {
    if (typeof value === 'number') {
        return value;
    }

    let isfloat = /^\d*(\.|,)\d*$/;

    if (isfloat.test(value)) {
        value = value.replace(',', '.');
    }

    let numberValue = Number(value);
    return numberValue == value || !value ? numberValue : value
}
function coerceNumber ( value ) { if ( typeof value === 'number' ) { return value ; } let isfloat = / ^\d*(\.|,)\d*$ / ; if ( isfloat . test ( value ) ) { value = value . replace ( ',' , '.' ) ; } let numberValue = Number ( value ) ; return numberValue == value || ! value ? numberValue : value }
Tries to convert the value to number. Since we can not decide
the type of the data coming back from the spreadsheet, we try to coerce it to number.
Finally we check the coerced value whether is equals to the original value. This check assure that the coercion
won't break anything. Note the 'weak equality' operator here is really important.

@param {*} value
@returns {*}
Tries to convert the value to number . Since we can not decide the type of the data coming back from the spreadsheet we try to coerce it to number . Finally we check the coerced value whether is equals to the original value . This check assure that the coercion won t break anything . Note the weak equality operator here is really important .