function vers_compare(a, b) {
  a = a.split('.');
  b = b.split('.');
  for (var i = 0; i < 3; i++) {
    var d = parseInt(a[i] || '0') - parseInt(b[i] || '0');
    if (d != 0) {
      return d;
    }
  }
  return 0; // Equal
}
function vers_compare(a, b) {
  a = a.split('.');
  b = b.split('.');
  for (var i = 0; i < 3; i++) {
    var d = parseInt(a[i] || '0') - parseInt(b[i] || '0');
    if (d != 0) {
      return d;
    }
  }
  return 0; // Equal
}
function vers_compare ( a , b ) { a = a . split ( '.' ) ; b = b . split ( '.' ) ; for ( var i = 0 ; i < 3 ; i ++ ) { var d = parseInt ( a [ i ] || '0' ) - parseInt ( b [ i ] || '0' ) ; if ( d != 0 ) { return d ; } } return 0 ; // Equal }
Compares a vs b, returns < 0 if a < b, > 0 if b > b, 0 if a == b
Compares a vs b returns < 0 if a < b > 0 if b > b 0 if a == b
Compare two vers_list