@aitianyu.cn/types 0.0.11 → 0.0.13

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 (67) hide show
  1. package/dist/lib/index.js +54 -54
  2. package/dist/lib/types/AreaCode.js +269 -269
  3. package/dist/lib/types/Exception.js +19 -19
  4. package/dist/lib/types/Logs.js +20 -20
  5. package/dist/lib/types/Object.js +3 -3
  6. package/dist/lib/types/PathBase.js +109 -109
  7. package/dist/lib/types/Security.js +10 -10
  8. package/dist/lib/types/TMap.js +138 -138
  9. package/dist/lib/types/Types.js +3 -3
  10. package/dist/lib/types/index.js +17 -17
  11. package/dist/lib/utilities/coding/Error.js +44 -44
  12. package/dist/lib/utilities/coding/Path.js +198 -198
  13. package/dist/lib/utilities/coding/index.js +10 -10
  14. package/dist/lib/utilities/core/Errors.js +86 -86
  15. package/dist/lib/utilities/core/Language.js +559 -559
  16. package/dist/lib/utilities/core/Log.js +108 -108
  17. package/dist/lib/utilities/core/TypeConvertion.js +25 -25
  18. package/dist/lib/utilities/core/index.js +21 -21
  19. package/dist/lib/utilities/core/interface/ITJSON.js +3 -0
  20. package/dist/lib/utilities/core/interface/ITianyuType.js +3 -0
  21. package/dist/lib/utilities/core/object/ArrayHelper.js +35 -35
  22. package/dist/lib/utilities/core/object/Calculater.js +230 -230
  23. package/dist/lib/utilities/core/object/Helper.js +201 -201
  24. package/dist/lib/utilities/core/object/StringHelper.js +22 -22
  25. package/dist/lib/utilities/core/type/TArray.js +7 -0
  26. package/dist/lib/utilities/core/type/TBoolean.js +7 -0
  27. package/dist/lib/utilities/core/type/TJSON.js +7 -0
  28. package/dist/lib/utilities/core/type/TNumber.js +7 -0
  29. package/dist/lib/utilities/core/type/TObject.js +7 -0
  30. package/dist/lib/utilities/core/type/TString.js +7 -0
  31. package/dist/lib/utilities/security/Guid.js +20 -20
  32. package/dist/lib/utilities/security/Hash.js +15 -15
  33. package/dist/lib/utilities/security/index.js +8 -8
  34. package/dist/types/index.d.ts +21 -21
  35. package/dist/types/types/AreaCode.d.ts +135 -135
  36. package/dist/types/types/Exception.d.ts +11 -11
  37. package/dist/types/types/Logs.d.ts +64 -64
  38. package/dist/types/types/Object.d.ts +18 -18
  39. package/dist/types/types/PathBase.d.ts +76 -76
  40. package/dist/types/types/Security.d.ts +23 -23
  41. package/dist/types/types/TMap.d.ts +80 -80
  42. package/dist/types/types/Types.d.ts +25 -20
  43. package/dist/types/types/index.d.ts +9 -9
  44. package/dist/types/utilities/coding/Error.d.ts +27 -27
  45. package/dist/types/utilities/coding/Path.d.ts +61 -61
  46. package/dist/types/utilities/coding/index.d.ts +3 -3
  47. package/dist/types/utilities/core/Errors.d.ts +47 -47
  48. package/dist/types/utilities/core/Language.d.ts +17 -17
  49. package/dist/types/utilities/core/Log.d.ts +12 -12
  50. package/dist/types/utilities/core/TypeConvertion.d.ts +2 -2
  51. package/dist/types/utilities/core/index.d.ts +6 -6
  52. package/dist/types/utilities/core/interface/ITJSON.d.ts +5 -0
  53. package/dist/types/utilities/core/interface/ITianyuType.d.ts +5 -0
  54. package/dist/types/utilities/core/object/ArrayHelper.d.ts +11 -11
  55. package/dist/types/utilities/core/object/Calculater.d.ts +22 -22
  56. package/dist/types/utilities/core/object/Helper.d.ts +39 -39
  57. package/dist/types/utilities/core/object/StringHelper.d.ts +4 -4
  58. package/dist/types/utilities/core/type/TArray.d.ts +3 -0
  59. package/dist/types/utilities/core/type/TBoolean.d.ts +3 -0
  60. package/dist/types/utilities/core/type/TJSON.d.ts +3 -0
  61. package/dist/types/utilities/core/type/TNumber.d.ts +3 -0
  62. package/dist/types/utilities/core/type/TObject.d.ts +3 -0
  63. package/dist/types/utilities/core/type/TString.d.ts +3 -0
  64. package/dist/types/utilities/security/Guid.d.ts +3 -3
  65. package/dist/types/utilities/security/Hash.d.ts +3 -3
  66. package/dist/types/utilities/security/index.d.ts +3 -3
  67. package/package.json +51 -51
@@ -1,201 +1,201 @@
1
- "use strict";
2
- /**@format */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ObjectHelper = void 0;
5
- const Errors_1 = require("../Errors");
6
- /** Object Helper of Tianyu to provide data type checking, objects comparing, validation, data clone and other functions */
7
- class ObjectHelper {
8
- /**
9
- * check whether the specified value does extend from nodejs native type
10
- *
11
- * @param {any} value supported value type of tianyu store
12
- * @returns {boolean} return true if the value is based on type number, string, boolean, function, otherwise false
13
- */
14
- static isSimpleDataType(value) {
15
- if (!!!value)
16
- return true;
17
- const typeofValue = typeof value;
18
- return typeofValue === "boolean" || typeofValue === "string" || typeofValue === "number" || typeofValue === "symbol";
19
- }
20
- /**
21
- * get a deep copy from source
22
- *
23
- * @param {any} sources the specified source value
24
- * @returns {any} return a new value that is independent from sources
25
- */
26
- static clone(source) {
27
- return ObjectHelper._clone(source);
28
- }
29
- static _clone(source) {
30
- if (typeof source === "function") {
31
- throw new Errors_1.ObjectCloneFunctionNotSupportException();
32
- }
33
- // check if source is simple data type, return directly
34
- if (ObjectHelper.isSimpleDataType(source)) {
35
- return source;
36
- }
37
- if (Array.isArray(source)) {
38
- // if is array type
39
- return ObjectHelper._cloneArray(source);
40
- }
41
- // otherwise, source value is a record type
42
- return ObjectHelper._cloneRecordType(source);
43
- }
44
- static _cloneArray(source) {
45
- // create a new array to save result
46
- const result = [];
47
- if (0 === source.length) {
48
- // if source value is empty array, return directly
49
- return result;
50
- }
51
- // loop all the item in the source value and to clone the item
52
- for (const item of source) {
53
- result.push(ObjectHelper._clone(item));
54
- }
55
- return result;
56
- }
57
- static _cloneRecordType(source) {
58
- // get all the record key from source object
59
- const keys = Object.keys(source);
60
- if (0 === keys.length) {
61
- // if the object is empty, return an empty object
62
- return {};
63
- }
64
- const result = {};
65
- // loop all the items in the source object by the key name
66
- for (const keyName of keys) {
67
- const sourceItem = source[keyName];
68
- result[keyName] = ObjectHelper._clone(sourceItem);
69
- }
70
- return result;
71
- }
72
- /**
73
- * Check the object whether can be stringified
74
- *
75
- * @param obj be checked object
76
- * @returns return true is valid, otherwise false
77
- */
78
- static validateSerializable(obj) {
79
- // if type is function, is not invaliable to be string
80
- if (typeof obj === "function") {
81
- return false;
82
- }
83
- // if is simple data type, is valiable
84
- if (ObjectHelper.isSimpleDataType(obj)) {
85
- return true;
86
- }
87
- // if is array, check member
88
- if (Array.isArray(obj)) {
89
- for (const item of obj) {
90
- // contains invalid member, return false
91
- if (!ObjectHelper.validateSerializable(item)) {
92
- return false;
93
- }
94
- }
95
- return true;
96
- }
97
- try {
98
- // if is object, check member
99
- const keys = Object.keys(obj);
100
- for (const keyName of keys) {
101
- const item = obj[keyName];
102
- // contains invalid member, return false
103
- if (!ObjectHelper.validateSerializable(item)) {
104
- return false;
105
- }
106
- }
107
- return true;
108
- }
109
- catch {
110
- // if the object is not an object type, return false
111
- return false;
112
- }
113
- }
114
- /**
115
- * Compare two or more objects are the same or different
116
- *
117
- * @param objs the objects which need to be compared
118
- * @returns same - if all the objects are same, different - if at least one object is not same to other objects
119
- * @description if there are only one parameter or no parameter is provided, same result will be returned
120
- */
121
- static compareObjects(...objs) {
122
- // if objs less than 2, is not comparable
123
- if (objs.length < 2) {
124
- return "same";
125
- }
126
- // if the first obj is simple data type, return different if other objects is not simple obj
127
- // or the type is not totally same.
128
- if (ObjectHelper.isSimpleDataType(objs[0])) {
129
- return ObjectHelper._compareSimpleType(...objs);
130
- }
131
- // if the first obj is array type, check all the objects are array and to do the detail checking
132
- if (Array.isArray(objs[0])) {
133
- return ObjectHelper._compareArrayType(...objs);
134
- }
135
- return ObjectHelper._compareObjectType(...objs);
136
- }
137
- static _compareSimpleType(...objs) {
138
- const firstObjType = typeof objs[0];
139
- for (let i = 1; i < objs.length; ++i) {
140
- if (firstObjType !== typeof objs[i] || objs[0] !== objs[i]) {
141
- return "different";
142
- }
143
- }
144
- return "same";
145
- }
146
- static _compareArrayType(...objs) {
147
- for (let i = 1; i < objs.length; ++i) {
148
- // check the type and array length if the obj is array type
149
- if (!Array.isArray(objs[i]) || objs[i].length !== objs[0].length) {
150
- return "different";
151
- }
152
- }
153
- // loop each item of the array to have a detail checking
154
- for (let j = 0; j < objs[0].length; ++j) {
155
- // create a checking array
156
- const items = [objs[0][j]];
157
- for (let i = 1; i < objs.length; ++i) {
158
- // add all the items of the each object which have the same index
159
- items.push(objs[i][j]);
160
- }
161
- const cmpRes = ObjectHelper.compareObjects(...items);
162
- if (cmpRes !== "same") {
163
- return cmpRes;
164
- }
165
- }
166
- return "same";
167
- }
168
- static _compareObjectType(...objs) {
169
- try {
170
- // other cases, the first obj is not simple obj and array, take checking as object
171
- // start add all the objects keys
172
- const keysOfObjs = [];
173
- keysOfObjs.push(Object.keys(objs[0]));
174
- // firstly, check the types of other objects
175
- for (let i = 1; i < objs.length; ++i) {
176
- keysOfObjs.push(Object.keys(objs[i]));
177
- }
178
- // check the keys are same or different
179
- if (ObjectHelper.compareObjects(...keysOfObjs) !== "same") {
180
- return "different";
181
- }
182
- // compare all the items
183
- for (const key of keysOfObjs[0]) {
184
- const items = [];
185
- for (const obj of objs) {
186
- items.push(obj[key]);
187
- }
188
- // get the items compare result
189
- const cmpRes = ObjectHelper.compareObjects(...items);
190
- if (cmpRes !== "same") {
191
- return cmpRes;
192
- }
193
- }
194
- return "same";
195
- }
196
- catch {
197
- return "different";
198
- }
199
- }
200
- }
201
- exports.ObjectHelper = ObjectHelper;
1
+ "use strict";
2
+ /**@format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ObjectHelper = void 0;
5
+ const Errors_1 = require("../Errors");
6
+ /** Object Helper of Tianyu to provide data type checking, objects comparing, validation, data clone and other functions */
7
+ class ObjectHelper {
8
+ /**
9
+ * check whether the specified value does extend from nodejs native type
10
+ *
11
+ * @param {any} value supported value type of tianyu store
12
+ * @returns {boolean} return true if the value is based on type number, string, boolean, function, otherwise false
13
+ */
14
+ static isSimpleDataType(value) {
15
+ if (!!!value)
16
+ return true;
17
+ const typeofValue = typeof value;
18
+ return typeofValue === "boolean" || typeofValue === "string" || typeofValue === "number" || typeofValue === "symbol";
19
+ }
20
+ /**
21
+ * get a deep copy from source
22
+ *
23
+ * @param {any} sources the specified source value
24
+ * @returns {any} return a new value that is independent from sources
25
+ */
26
+ static clone(source) {
27
+ return ObjectHelper._clone(source);
28
+ }
29
+ static _clone(source) {
30
+ if (typeof source === "function") {
31
+ throw new Errors_1.ObjectCloneFunctionNotSupportException();
32
+ }
33
+ // check if source is simple data type, return directly
34
+ if (ObjectHelper.isSimpleDataType(source)) {
35
+ return source;
36
+ }
37
+ if (Array.isArray(source)) {
38
+ // if is array type
39
+ return ObjectHelper._cloneArray(source);
40
+ }
41
+ // otherwise, source value is a record type
42
+ return ObjectHelper._cloneRecordType(source);
43
+ }
44
+ static _cloneArray(source) {
45
+ // create a new array to save result
46
+ const result = [];
47
+ if (0 === source.length) {
48
+ // if source value is empty array, return directly
49
+ return result;
50
+ }
51
+ // loop all the item in the source value and to clone the item
52
+ for (const item of source) {
53
+ result.push(ObjectHelper._clone(item));
54
+ }
55
+ return result;
56
+ }
57
+ static _cloneRecordType(source) {
58
+ // get all the record key from source object
59
+ const keys = Object.keys(source);
60
+ if (0 === keys.length) {
61
+ // if the object is empty, return an empty object
62
+ return {};
63
+ }
64
+ const result = {};
65
+ // loop all the items in the source object by the key name
66
+ for (const keyName of keys) {
67
+ const sourceItem = source[keyName];
68
+ result[keyName] = ObjectHelper._clone(sourceItem);
69
+ }
70
+ return result;
71
+ }
72
+ /**
73
+ * Check the object whether can be stringified
74
+ *
75
+ * @param obj be checked object
76
+ * @returns return true is valid, otherwise false
77
+ */
78
+ static validateSerializable(obj) {
79
+ // if type is function, is not invaliable to be string
80
+ if (typeof obj === "function") {
81
+ return false;
82
+ }
83
+ // if is simple data type, is valiable
84
+ if (ObjectHelper.isSimpleDataType(obj)) {
85
+ return true;
86
+ }
87
+ // if is array, check member
88
+ if (Array.isArray(obj)) {
89
+ for (const item of obj) {
90
+ // contains invalid member, return false
91
+ if (!ObjectHelper.validateSerializable(item)) {
92
+ return false;
93
+ }
94
+ }
95
+ return true;
96
+ }
97
+ try {
98
+ // if is object, check member
99
+ const keys = Object.keys(obj);
100
+ for (const keyName of keys) {
101
+ const item = obj[keyName];
102
+ // contains invalid member, return false
103
+ if (!ObjectHelper.validateSerializable(item)) {
104
+ return false;
105
+ }
106
+ }
107
+ return true;
108
+ }
109
+ catch {
110
+ // if the object is not an object type, return false
111
+ return false;
112
+ }
113
+ }
114
+ /**
115
+ * Compare two or more objects are the same or different
116
+ *
117
+ * @param objs the objects which need to be compared
118
+ * @returns same - if all the objects are same, different - if at least one object is not same to other objects
119
+ * @description if there are only one parameter or no parameter is provided, same result will be returned
120
+ */
121
+ static compareObjects(...objs) {
122
+ // if objs less than 2, is not comparable
123
+ if (objs.length < 2) {
124
+ return "same";
125
+ }
126
+ // if the first obj is simple data type, return different if other objects is not simple obj
127
+ // or the type is not totally same.
128
+ if (ObjectHelper.isSimpleDataType(objs[0])) {
129
+ return ObjectHelper._compareSimpleType(...objs);
130
+ }
131
+ // if the first obj is array type, check all the objects are array and to do the detail checking
132
+ if (Array.isArray(objs[0])) {
133
+ return ObjectHelper._compareArrayType(...objs);
134
+ }
135
+ return ObjectHelper._compareObjectType(...objs);
136
+ }
137
+ static _compareSimpleType(...objs) {
138
+ const firstObjType = typeof objs[0];
139
+ for (let i = 1; i < objs.length; ++i) {
140
+ if (firstObjType !== typeof objs[i] || objs[0] !== objs[i]) {
141
+ return "different";
142
+ }
143
+ }
144
+ return "same";
145
+ }
146
+ static _compareArrayType(...objs) {
147
+ for (let i = 1; i < objs.length; ++i) {
148
+ // check the type and array length if the obj is array type
149
+ if (!Array.isArray(objs[i]) || objs[i].length !== objs[0].length) {
150
+ return "different";
151
+ }
152
+ }
153
+ // loop each item of the array to have a detail checking
154
+ for (let j = 0; j < objs[0].length; ++j) {
155
+ // create a checking array
156
+ const items = [objs[0][j]];
157
+ for (let i = 1; i < objs.length; ++i) {
158
+ // add all the items of the each object which have the same index
159
+ items.push(objs[i][j]);
160
+ }
161
+ const cmpRes = ObjectHelper.compareObjects(...items);
162
+ if (cmpRes !== "same") {
163
+ return cmpRes;
164
+ }
165
+ }
166
+ return "same";
167
+ }
168
+ static _compareObjectType(...objs) {
169
+ try {
170
+ // other cases, the first obj is not simple obj and array, take checking as object
171
+ // start add all the objects keys
172
+ const keysOfObjs = [];
173
+ keysOfObjs.push(Object.keys(objs[0]));
174
+ // firstly, check the types of other objects
175
+ for (let i = 1; i < objs.length; ++i) {
176
+ keysOfObjs.push(Object.keys(objs[i]));
177
+ }
178
+ // check the keys are same or different
179
+ if (ObjectHelper.compareObjects(...keysOfObjs) !== "same") {
180
+ return "different";
181
+ }
182
+ // compare all the items
183
+ for (const key of keysOfObjs[0]) {
184
+ const items = [];
185
+ for (const obj of objs) {
186
+ items.push(obj[key]);
187
+ }
188
+ // get the items compare result
189
+ const cmpRes = ObjectHelper.compareObjects(...items);
190
+ if (cmpRes !== "same") {
191
+ return cmpRes;
192
+ }
193
+ }
194
+ return "same";
195
+ }
196
+ catch {
197
+ return "different";
198
+ }
199
+ }
200
+ }
201
+ exports.ObjectHelper = ObjectHelper;
@@ -1,22 +1,22 @@
1
- "use strict";
2
- /**@format */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.StringHelper = void 0;
5
- class StringHelper {
6
- static format(source, args) {
7
- if (!args) {
8
- return source;
9
- }
10
- const argument = Array.isArray(args) ? args : [args];
11
- return source.replace(/('')|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g, (_match, $1, $2, _$3) => {
12
- if ($1) {
13
- return "'";
14
- }
15
- else if ($2) {
16
- return String(argument[parseInt($2, 10)]);
17
- }
18
- return "";
19
- });
20
- }
21
- }
22
- exports.StringHelper = StringHelper;
1
+ "use strict";
2
+ /**@format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.StringHelper = void 0;
5
+ class StringHelper {
6
+ static format(source, args) {
7
+ if (!args) {
8
+ return source;
9
+ }
10
+ const argument = Array.isArray(args) ? args : [args];
11
+ return source.replace(/('')|\{([0-9]+(?:\s*,[^{}]*)?)\}|[{}]/g, (_match, $1, $2, _$3) => {
12
+ if ($1) {
13
+ return "'";
14
+ }
15
+ else if ($2) {
16
+ return String(argument[parseInt($2, 10)]);
17
+ }
18
+ return "";
19
+ });
20
+ }
21
+ }
22
+ exports.StringHelper = StringHelper;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /** @format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TArray = void 0;
5
+ class TArray {
6
+ }
7
+ exports.TArray = TArray;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /** @format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TBoolean = void 0;
5
+ class TBoolean {
6
+ }
7
+ exports.TBoolean = TBoolean;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /** @format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TJSON = void 0;
5
+ class TJSON {
6
+ }
7
+ exports.TJSON = TJSON;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /** @format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TNumber = void 0;
5
+ class TNumber {
6
+ }
7
+ exports.TNumber = TNumber;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /** @format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TObject = void 0;
5
+ class TObject {
6
+ }
7
+ exports.TObject = TObject;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /** @format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TString = void 0;
5
+ class TString {
6
+ }
7
+ exports.TString = TString;
@@ -1,20 +1,20 @@
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
+ "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,15 +1,15 @@
1
- "use strict";
2
- /**@format */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.hash = void 0;
5
- /** Generate a hash code number of the string */
6
- function hash(source) {
7
- let length = source.length;
8
- let hashCode = 0;
9
- while (length--) {
10
- hashCode = (hashCode << 5) - hashCode + source.charCodeAt(length);
11
- hashCode = hashCode & hashCode; // convert to 32 bit
12
- }
13
- return hashCode;
14
- }
15
- exports.hash = hash;
1
+ "use strict";
2
+ /**@format */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.hash = void 0;
5
+ /** Generate a hash code number of the string */
6
+ function hash(source) {
7
+ let length = source.length;
8
+ let hashCode = 0;
9
+ while (length--) {
10
+ hashCode = (hashCode << 5) - hashCode + source.charCodeAt(length);
11
+ hashCode = hashCode & hashCode; // convert to 32 bit
12
+ }
13
+ return hashCode;
14
+ }
15
+ exports.hash = hash;
@@ -1,8 +1,8 @@
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
+ "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,21 +1,21 @@
1
- /**@format */
2
- export { AreaCode } from "./types/AreaCode";
3
- export { Exception } from "./types/Exception";
4
- export { LogLevel, type ILog, type IPerfRecorder } from "./types/Logs";
5
- export { type IObjectDiffInfo, type ObjectDiffMap } from "./types/Object";
6
- export { PathBase } from "./types/PathBase";
7
- export { EncryptOption, type ICipher } from "./types/Security";
8
- export { TMap } from "./types/TMap";
9
- export { type MapOfBoolean, type MapOfStrings, type MapOfString, type MapOfType, type CallbackAction, type CallbackActionT, type IComparable, } from "./types/Types";
10
- export { PathProcessorSourceLostException, PathDirectoryValidationFailException, PathDirAndFileConvertInvaild, } from "./utilities/coding/Error";
11
- export { type PathTargetType, Path } from "./utilities/coding/Path";
12
- export { ArgumentNullOrEmptyException, ObjectCloneFunctionNotSupportException, ObjectMergeStatusCheckFailedException, ObjectDiffApplyInvalidStatusException, ObjectDiffMergeFailedException, } from "./utilities/core/Errors";
13
- export { parseAreaCode, parseAreaString } from "./utilities/core/Language";
14
- export { Log, Performance } from "./utilities/core/Log";
15
- export { getBoolean } from "./utilities/core/TypeConvertion";
16
- export { ObjectCalculater } from "./utilities/core/object/Calculater";
17
- export { ObjectHelper } from "./utilities/core/object/Helper";
18
- export { ArrayHelper } from "./utilities/core/object/ArrayHelper";
19
- export { StringHelper } from "./utilities/core/object/StringHelper";
20
- export { guid } from "./utilities/security/Guid";
21
- export { hash } from "./utilities/security/Hash";
1
+ /**@format */
2
+ export { AreaCode } from "./types/AreaCode";
3
+ export { Exception } from "./types/Exception";
4
+ export { LogLevel, type ILog, type IPerfRecorder } from "./types/Logs";
5
+ export { type IObjectDiffInfo, type ObjectDiffMap } from "./types/Object";
6
+ export { PathBase } from "./types/PathBase";
7
+ export { EncryptOption, type ICipher } from "./types/Security";
8
+ export { TMap } from "./types/TMap";
9
+ export { type MapOfBoolean, type MapOfStrings, type MapOfString, type MapOfType, type CallbackAction, type CallbackActionT, type IComparable, type KeyValuePair, } from "./types/Types";
10
+ export { PathProcessorSourceLostException, PathDirectoryValidationFailException, PathDirAndFileConvertInvaild, } from "./utilities/coding/Error";
11
+ export { type PathTargetType, Path } from "./utilities/coding/Path";
12
+ export { ArgumentNullOrEmptyException, ObjectCloneFunctionNotSupportException, ObjectMergeStatusCheckFailedException, ObjectDiffApplyInvalidStatusException, ObjectDiffMergeFailedException, } from "./utilities/core/Errors";
13
+ export { parseAreaCode, parseAreaString } from "./utilities/core/Language";
14
+ export { Log, Performance } from "./utilities/core/Log";
15
+ export { getBoolean } from "./utilities/core/TypeConvertion";
16
+ export { ObjectCalculater } from "./utilities/core/object/Calculater";
17
+ export { ObjectHelper } from "./utilities/core/object/Helper";
18
+ export { ArrayHelper } from "./utilities/core/object/ArrayHelper";
19
+ export { StringHelper } from "./utilities/core/object/StringHelper";
20
+ export { guid } from "./utilities/security/Guid";
21
+ export { hash } from "./utilities/security/Hash";