@aitianyu.cn/types 0.0.12 → 0.1.0

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.
Files changed (87) hide show
  1. package/dist/lib/{utilities/coding → coding}/Error.js +44 -44
  2. package/dist/lib/{utilities/coding → coding}/Path.js +210 -198
  3. package/dist/lib/{utilities/core → core}/Errors.js +86 -86
  4. package/dist/lib/{utilities/core → core}/Language.js +561 -559
  5. package/dist/lib/{utilities/core → core}/Log.js +112 -108
  6. package/dist/lib/{utilities/core → core}/TypeConvertion.js +25 -25
  7. package/dist/lib/{utilities/core → core}/interface/ITJSON.js +3 -3
  8. package/dist/lib/{utilities/core → core}/interface/ITianyuType.js +3 -3
  9. package/dist/lib/{utilities/core → core}/object/ArrayHelper.js +35 -35
  10. package/dist/lib/core/object/Bytes.js +21 -0
  11. package/dist/lib/{utilities/core → core}/object/Calculater.js +240 -230
  12. package/dist/lib/core/object/DataView.js +23 -0
  13. package/dist/lib/core/object/Integer.js +117 -0
  14. package/dist/lib/core/object/Json.js +35 -0
  15. package/dist/lib/{utilities/core/object/Helper.js → core/object/ObjectHelper.js} +202 -201
  16. package/dist/lib/core/object/StringHelper.js +61 -0
  17. package/dist/lib/{utilities/core → core}/type/TArray.js +8 -7
  18. package/dist/lib/{utilities/core → core}/type/TBoolean.js +7 -7
  19. package/dist/lib/{utilities/core → core}/type/TJSON.js +7 -7
  20. package/dist/lib/{utilities/core → core}/type/TNumber.js +7 -7
  21. package/dist/lib/{utilities/core → core}/type/TObject.js +7 -7
  22. package/dist/lib/{utilities/core → core}/type/TString.js +7 -7
  23. package/dist/lib/index.js +70 -54
  24. package/dist/lib/security/Base32.js +104 -0
  25. package/dist/lib/security/Guid.js +26 -0
  26. package/dist/lib/{utilities/security → security}/Hash.js +16 -15
  27. package/dist/lib/security/QRCode.js +46 -0
  28. package/dist/lib/security/RSA.js +62 -0
  29. package/dist/lib/security/SHA.js +67 -0
  30. package/dist/lib/types/AreaCode.js +269 -269
  31. package/dist/lib/types/Exception.js +19 -19
  32. package/dist/lib/types/Logs.js +20 -20
  33. package/dist/lib/types/Object.js +3 -3
  34. package/dist/lib/types/PathBase.js +109 -109
  35. package/dist/lib/types/Security.js +10 -10
  36. package/dist/lib/types/TMap.js +139 -138
  37. package/dist/lib/types/Types.js +3 -3
  38. package/dist/lib/types/index.js +17 -17
  39. package/dist/types/{utilities/coding → coding}/Error.d.ts +27 -27
  40. package/dist/types/{utilities/coding → coding}/Path.d.ts +61 -61
  41. package/dist/types/{utilities/core → core}/Errors.d.ts +47 -47
  42. package/dist/types/{utilities/core → core}/Language.d.ts +17 -17
  43. package/dist/types/{utilities/core → core}/Log.d.ts +12 -12
  44. package/dist/types/{utilities/core → core}/TypeConvertion.d.ts +2 -2
  45. package/dist/types/{utilities/core → core}/interface/ITJSON.d.ts +5 -5
  46. package/dist/types/{utilities/core → core}/interface/ITianyuType.d.ts +5 -5
  47. package/dist/types/{utilities/core → core}/object/ArrayHelper.d.ts +11 -11
  48. package/dist/types/core/object/Bytes.d.ts +13 -0
  49. package/dist/types/{utilities/core → core}/object/Calculater.d.ts +22 -22
  50. package/dist/types/core/object/DataView.d.ts +11 -0
  51. package/dist/types/core/object/Integer.d.ts +71 -0
  52. package/dist/types/core/object/Json.d.ts +22 -0
  53. package/dist/types/{utilities/core/object/Helper.d.ts → core/object/ObjectHelper.d.ts} +39 -39
  54. package/dist/types/core/object/StringHelper.d.ts +21 -0
  55. package/dist/types/{utilities/core → core}/type/TArray.d.ts +3 -3
  56. package/dist/types/{utilities/core → core}/type/TBoolean.d.ts +3 -3
  57. package/dist/types/{utilities/core → core}/type/TJSON.d.ts +3 -3
  58. package/dist/types/{utilities/core → core}/type/TNumber.d.ts +3 -3
  59. package/dist/types/{utilities/core → core}/type/TObject.d.ts +3 -3
  60. package/dist/types/{utilities/core → core}/type/TString.d.ts +3 -3
  61. package/dist/types/index.d.ts +29 -21
  62. package/dist/types/security/Base32.d.ts +42 -0
  63. package/dist/types/security/Guid.d.ts +4 -0
  64. package/dist/types/{utilities/security → security}/Hash.d.ts +3 -3
  65. package/dist/types/security/QRCode.d.ts +11 -0
  66. package/dist/types/security/RSA.d.ts +68 -0
  67. package/dist/types/security/SHA.d.ts +40 -0
  68. package/dist/types/types/AreaCode.d.ts +135 -135
  69. package/dist/types/types/Exception.d.ts +11 -11
  70. package/dist/types/types/Logs.d.ts +64 -64
  71. package/dist/types/types/Object.d.ts +18 -18
  72. package/dist/types/types/PathBase.d.ts +76 -76
  73. package/dist/types/types/Security.d.ts +23 -23
  74. package/dist/types/types/TMap.d.ts +80 -80
  75. package/dist/types/types/Types.d.ts +25 -25
  76. package/dist/types/types/index.d.ts +9 -9
  77. package/package.json +57 -51
  78. package/dist/lib/utilities/coding/index.js +0 -10
  79. package/dist/lib/utilities/core/index.js +0 -21
  80. package/dist/lib/utilities/core/object/StringHelper.js +0 -22
  81. package/dist/lib/utilities/security/Guid.js +0 -20
  82. package/dist/lib/utilities/security/index.js +0 -8
  83. package/dist/types/utilities/coding/index.d.ts +0 -3
  84. package/dist/types/utilities/core/index.d.ts +0 -6
  85. package/dist/types/utilities/core/object/StringHelper.d.ts +0 -4
  86. package/dist/types/utilities/security/Guid.d.ts +0 -3
  87. package/dist/types/utilities/security/index.d.ts +0 -3
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /**@format */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.guid = void 0;
5
- /** Generate a Guid value string */
6
- function guid() {
7
- let d = new Date().getTime();
8
- if (typeof performance === "undefined") {
9
- // global.performance = require("perf_hooks").performance;
10
- global.performance = eval("require")("perf_hooks").performance;
11
- }
12
- d += performance.now(); //use high-precision timer if available
13
- const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
14
- const r = (d + Math.random() * 16) % 16 | 0; // d是随机种子
15
- d = Math.floor(d / 16);
16
- return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
17
- });
18
- return uuid;
19
- }
20
- exports.guid = guid;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**@format */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.hash = exports.guid = void 0;
5
- var Guid_1 = require("./Guid");
6
- Object.defineProperty(exports, "guid", { enumerable: true, get: function () { return Guid_1.guid; } });
7
- var Hash_1 = require("./Hash");
8
- Object.defineProperty(exports, "hash", { enumerable: true, get: function () { return Hash_1.hash; } });
@@ -1,3 +0,0 @@
1
- /**@format */
2
- export { PathProcessorSourceLostException, PathDirectoryValidationFailException, PathDirAndFileConvertInvaild } from "./Error";
3
- export { type PathTargetType, Path } from "./Path";
@@ -1,6 +0,0 @@
1
- /**@format */
2
- export { ArgumentNullOrEmptyException, ObjectCloneFunctionNotSupportException, ObjectMergeStatusCheckFailedException, ObjectDiffApplyInvalidStatusException, ObjectDiffMergeFailedException, } from "./Errors";
3
- export { parseAreaCode, parseAreaString } from "./Language";
4
- export { Log, Performance } from "./Log";
5
- export { ObjectCalculater } from "./object/Calculater";
6
- export { ObjectHelper } from "./object/Helper";
@@ -1,4 +0,0 @@
1
- /**@format */
2
- export declare class StringHelper {
3
- static format(source: string, args?: (string | number)[] | string): string;
4
- }
@@ -1,3 +0,0 @@
1
- /**@format */
2
- /** Generate a Guid value string */
3
- export declare function guid(): string;
@@ -1,3 +0,0 @@
1
- /**@format */
2
- export { guid } from "./Guid";
3
- export { hash } from "./Hash";