feat:node-modules

This commit is contained in:
houjunxiang
2025-11-24 10:26:18 +08:00
parent 753766893b
commit 8a3e48d856
8825 changed files with 567399 additions and 1 deletions

22
node_modules/javascript-natural-sort/.gitattributes generated vendored Normal file
View File

@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

163
node_modules/javascript-natural-sort/.npmignore generated vendored Normal file

File diff suppressed because it is too large Load Diff

76
node_modules/javascript-natural-sort/README.md generated vendored Normal file
View File

@@ -0,0 +1,76 @@
### Simple numerics
```javascript
>>> ['10',9,2,'1','4'].sort(naturalSort)
['1',2,'4',9,'10']
```
### Floats
```javascript
>>> ['10.0401',10.022,10.042,'10.021999'].sort(naturalSort)
['10.021999',10.022,'10.0401',10.042]
```
### Float & decimal notation
```javascript
>>> ['10.04f','10.039F','10.038d','10.037D'].sort(naturalSort)
['10.037D','10.038d','10.039F','10.04f']
```
### Scientific notation
```javascript
>>> ['1.528535047e5','1.528535047e7','1.528535047e3'].sort(naturalSort)
['1.528535047e3','1.528535047e5','1.528535047e7']
```
### IP addresses
```javascript
>>> ['192.168.0.100','192.168.0.1','192.168.1.1'].sort(naturalSort)
['192.168.0.1','192.168.0.100','192.168.1.1']
```
### Filenames
```javascript
>>> ['car.mov','01alpha.sgi','001alpha.sgi','my.string_41299.tif'].sort(naturalSort)
['001alpha.sgi','01alpha.sgi','car.mov','my.string_41299.tif'
```
### Dates
```javascript
>>> ['10/12/2008','10/11/2008','10/11/2007','10/12/2007'].sort(naturalSort)
['10/11/2007', '10/12/2007', '10/11/2008', '10/12/2008']
```
### Money
```javascript
>>> ['$10002.00','$10001.02','$10001.01'].sort(naturalSort)
['$10001.01','$10001.02','$10002.00']
```
### Movie Titles
```javascript
>>> ['1 Title - The Big Lebowski','1 Title - Gattaca','1 Title - Last Picture Show'].sort(naturalSort)
['1 Title - Gattaca','1 Title - Last Picture Show','1 Title - The Big Lebowski']
```
### By default - case-sensitive sorting
```javascript
>>> ['a', 'B'].sort(naturalSort);
['B', 'a']
```
### To enable case-insensitive sorting
```javascript
>>> naturalSort.insensitive = true;
>>> ['a', 'B'].sort(naturalSort);
['a', 'B']
```

100
node_modules/javascript-natural-sort/index.html generated vendored Normal file

File diff suppressed because it is too large Load Diff

45
node_modules/javascript-natural-sort/naturalSort.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
/*
* Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license
* Author: Jim Palmer (based on chunking idea from Dave Koelle)
*/
/*jshint unused:false */
module.exports = function naturalSort (a, b) {
"use strict";
var re = /(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,
sre = /(^[ ]*|[ ]*$)/g,
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
hre = /^0x[0-9a-f]+$/i,
ore = /^0/,
i = function(s) { return naturalSort.insensitive && ('' + s).toLowerCase() || '' + s; },
// convert all to strings strip whitespace
x = i(a).replace(sre, '') || '',
y = i(b).replace(sre, '') || '',
// chunk/tokenize
xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
// numeric, hex or date detection
xD = parseInt(x.match(hre), 16) || (xN.length !== 1 && x.match(dre) && Date.parse(x)),
yD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null,
oFxNcL, oFyNcL;
// first try and sort Hex codes or Dates
if (yD) {
if ( xD < yD ) { return -1; }
else if ( xD > yD ) { return 1; }
}
// natural sorting through split numeric strings and default strings
for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {
// find floats not starting with '0', string or 0 if not defined (Clint Priest)
oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;
// handle numeric vs string comparison - number < string - (Kyle Adams)
if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { return (isNaN(oFxNcL)) ? 1 : -1; }
// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
else if (typeof oFxNcL !== typeof oFyNcL) {
oFxNcL += '';
oFyNcL += '';
}
if (oFxNcL < oFyNcL) { return -1; }
if (oFxNcL > oFyNcL) { return 1; }
}
return 0;
};

27
node_modules/javascript-natural-sort/package.json generated vendored Normal file
View File

@@ -0,0 +1,27 @@
{
"name": "javascript-natural-sort",
"version": "0.7.1",
"description": "Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license",
"main": "naturalSort.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/Bill4Time/javascript-natural-sort.git"
},
"keywords": [
"natural",
"sort",
"javascript",
"array",
"sort",
"sorting"
],
"author": "Jim Palmer (based on chunking idea from Dave Koelle, packaged by @khous of Bill4Time)",
"license": "MIT",
"bugs": {
"url": "https://github.com/Bill4Time/javascript-natural-sort/issues"
},
"homepage": "https://github.com/Bill4Time/javascript-natural-sort"
}

105
node_modules/javascript-natural-sort/speed-tests.html generated vendored Normal file

File diff suppressed because it is too large Load Diff

365
node_modules/javascript-natural-sort/unit-tests.html generated vendored Normal file

File diff suppressed because it is too large Load Diff