lib/util/browser-detection.js
function (version) {
    var splitDots = version.split(".");
    var nbDots = splitDots.length - 1;
    if (nbDots === 0) {
        return version + ".0.0";
    } else if (nbDots === 1) {
        return version + ".0";
    } else if (nbDots === 2) {
        return version;
    } else {
        return splitDots.slice(0, 3).join(".") + "-" + splitDots.slice(3).join(".");
    }
}
function (version) {
    var splitDots = version.split(".");
    var nbDots = splitDots.length - 1;
    if (nbDots === 0) {
        return version + ".0.0";
    } else if (nbDots === 1) {
        return version + ".0";
    } else if (nbDots === 2) {
        return version;
    } else {
        return splitDots.slice(0, 3).join(".") + "-" + splitDots.slice(3).join(".");
    }
}
function ( version ) { var splitDots = version . split ( "." ) ; var nbDots = splitDots . length - 1 ; if ( nbDots === 0 ) { return version + ".0.0" ; } else if ( nbDots === 1 ) { return version + ".0" ; } else if ( nbDots === 2 ) { return version ; } else { return splitDots . slice ( 0 , 3 ) . join ( "." ) + "-" + splitDots . slice ( 3 ) . join ( "." ) ; } }
semver-compliant version must be x.y.z
semver - compliant version must be x . y . z