main funcions fixes

This commit is contained in:
2025-09-29 22:06:11 +09:00
parent 40e016e128
commit c8c3274527
7995 changed files with 1517998 additions and 1057 deletions

View File

@@ -0,0 +1,31 @@
# compare-version [![Build Status](https://travis-ci.org/kevva/compare-version.svg?branch=master)](https://travis-ci.org/kevva/compare-version)
> Compare version numbers.
## Install
```bash
$ npm install --save compare-version
```
```bash
$ component install kevva/compare-version
```
```bash
$ bower install --save compare-version
```
## Usage
```js
var compareVersion = require('compare-version');
compareVersion('1.11.0', '1.11.0'); // => 0
compareVersion('1.11.0', '1.2.9'); // => 1
compareVersion('1.11.3', '1.11.25'); // => -1
```
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Kevin Mårtensson](https://github.com/kevva)

33
desktop-operator/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;
};

View File

@@ -0,0 +1,32 @@
{
"name": "compare-version",
"version": "0.1.2",
"description": "Compare semver version numbers",
"license": "MIT",
"repository": "kevva/compare-version",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "https://github.com/kevva"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"browser": "browserify -s $npm_package_name -o browser.js .",
"test": "mocha --reporter list"
},
"files": [
"index.js"
],
"keywords": [
"compare",
"number",
"semver",
"version"
],
"devDependencies": {
"browserify": "^3.44.2",
"mocha": "^1.18.2"
}
}