tools-min-ns 1.18.5 → 1.18.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,6 +5,12 @@ pnpm i tools-min-ns --save
5
5
  ```
6
6
 
7
7
  # updates
8
+ ## v1.18.7
9
+ fix: 不需要那么严格的URL正则
10
+
11
+ ## v1.18.6
12
+ fix: tree getItemPathByTree
13
+
8
14
  ## v1.18.5
9
15
  减小包体积
10
16
  ## v1.18.3/4
@@ -203,7 +203,7 @@ var TreeUtil;
203
203
  rootPid = _e === void 0 ? undefined : _e;
204
204
  if (BaseUtil.isEmpty(id)) return [];
205
205
  var idList = filterTreeData(tree, function (t) {
206
- return t[value] === id;
206
+ return String(t[value]) === String(id);
207
207
  });
208
208
  var list = getListByTree(tree, children);
209
209
  var _getList = function getList(importOid) {
@@ -456,7 +456,7 @@ var CheckUtil;
456
456
  case 'EMAIL':
457
457
  return /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
458
458
  case 'URL':
459
- return /^(http|https|ftp)\:\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\,\*\?\'\\\+&%\$#\=~_\-]+))*$/;
459
+ return /^(http|https|ftp):\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/.*)?$/;
460
460
  case 'IP':
461
461
  return /((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))/;
462
462
  case 'DATE':
@@ -213,7 +213,7 @@ var TreeUtil;
213
213
  rootPid = _e === void 0 ? undefined : _e;
214
214
  if (BaseUtil_1.default.isEmpty(id)) return [];
215
215
  var idList = filterTreeData(tree, function (t) {
216
- return t[value] === id;
216
+ return String(t[value]) === String(id);
217
217
  });
218
218
  var list = getListByTree(tree, children);
219
219
  var _getList = function getList(importOid) {
@@ -466,7 +466,7 @@ var CheckUtil;
466
466
  case 'EMAIL':
467
467
  return /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
468
468
  case 'URL':
469
- return /^(http|https|ftp)\:\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\,\*\?\'\\\+&%\$#\=~_\-]+))*$/;
469
+ return /^(http|https|ftp):\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/.*)?$/;
470
470
  case 'IP':
471
471
  return /((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))/;
472
472
  case 'DATE':
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tools-min-ns",
3
3
  "description": "工具包适用于前端以及node",
4
- "version": "1.18.5",
4
+ "version": "1.18.7",
5
5
  "main": "lib/index.js",
6
6
  "license": "MIT",
7
7
  "author": "nanshen",