ipv4.js
function convToNum(ipstr) {
    let ret = 0;
    let mul = 256*256*256;
    ipstr.split('.').forEach((numstr)=>{
        ret += parseInt(numstr)*mul;
        mul >>= 8;
    });
    return ret;
}
function convToNum(ipstr) {
    let ret = 0;
    let mul = 256*256*256;
    ipstr.split('.').forEach((numstr)=>{
        ret += parseInt(numstr)*mul;
        mul >>= 8;
    });
    return ret;
}
function convToNum ( ipstr ) { let ret = 0 ; let mul = 256 * 256 * 256 ; ipstr . split ( '.' ) . forEach ( ( numstr ) => { ret += parseInt ( numstr ) * mul ; mul >>= 8 ; } ) ; return ret ; }
Convert to number value from string IP address
@param {string} ipstr : string IP address
@return {number} number value of IP address
Convert to number value from string IP address