ubnt.js
//bottom charts need some math help
bottom charts need some math help
bottom charts need some math help
function speed_convert(str) {
            let res = Number(str.replace(/[^0-9\.]+/g, ""));
            if (str.includes('kbps')) {
                res /= 1000.0;
            } else if (str.includes('Mbps')) {
            } else if (str.includes('bps')) {
                res /= 1000000.0;
            }
            return res;
        }
function speed_convert ( str ) { let res = Number ( str . replace ( / [^0-9\.]+ / g , "" ) ) ; if ( str . includes ( 'kbps' ) ) { res /= 1000.0 ; } else if ( str . includes ( 'Mbps' ) ) { } else if ( str . includes ( 'bps' ) ) { res /= 1000000.0 ; } return res ; }
bottom charts need some math help
bottom charts need some math help
//see if we need to convert kbps to mbps //divide the number by 1000 //Do nothing, unit we want //bytes, divide by a ton for mbps units