1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 05:10:05 +02:00

add node modules to repo

This commit is contained in:
s2
2018-06-03 13:47:11 +02:00
parent e8c95255e8
commit d002126b72
4115 changed files with 440218 additions and 7519 deletions

33
node_modules/compare-version/index.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
'use strict';
/**
* Compare semver version numbers
*
* @param {String} a
* @param {String} b
* @api public
*/
module.exports = function(a, b) {
var i;
var len;
if (typeof a + typeof b !== 'stringstring') {
return false;
}
a = a.split('.');
b = b.split('.');
i = 0;
len = Math.max(a.length, b.length);
for (; i < len; i++) {
if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) {
return 1;
} else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) {
return -1;
}
}
return 0;
};