2018-12-27 19:41:40 +01:00
|
|
|
var version = (function() {
|
|
|
|
|
2019-01-13 23:54:48 +01:00
|
|
|
// version is normally bumped when the state needs changing or any new functionality is added
|
2019-05-24 16:07:19 +02:00
|
|
|
var current = "3.1.6";
|
2019-03-25 13:24:38 +01:00
|
|
|
|
|
|
|
var compare = function(a, b) {
|
|
|
|
var pa = a.split(".");
|
|
|
|
var pb = b.split(".");
|
|
|
|
for (var i = 0; i < 3; i++) {
|
|
|
|
var na = Number(pa[i]);
|
|
|
|
var nb = Number(pb[i]);
|
|
|
|
if (na > nb) {
|
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
if (nb > na) {
|
|
|
|
return -1;
|
|
|
|
};
|
|
|
|
if (!isNaN(na) && isNaN(nb)) {
|
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
if (isNaN(na) && !isNaN(nb)) {
|
|
|
|
return -1;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
};
|
2018-12-27 19:41:40 +01:00
|
|
|
|
|
|
|
var get = function() {
|
2019-03-25 13:24:38 +01:00
|
|
|
return current;
|
2018-12-27 19:41:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// exposed methods
|
|
|
|
return {
|
2019-03-25 13:24:38 +01:00
|
|
|
get: get,
|
|
|
|
compare: compare
|
2018-12-27 19:41:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
})();
|