@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,18 +1,18 @@
1
- /**@format */
2
- import { TMap } from "./TMap";
3
- import { PathBase } from "./PathBase";
4
- /** Tianyu Object calculated different item */
5
- export interface IObjectDiffInfo {
6
- /** different item path */
7
- path: string;
8
- /** the old value of this path */
9
- old: any;
10
- /** the new value of this path */
11
- new: any;
12
- /** does the change be deletion */
13
- deleted?: true;
14
- /** does the change be adding */
15
- added?: true;
16
- }
17
- /** Different items map */
18
- export type ObjectDiffMap = TMap<PathBase, IObjectDiffInfo>;
1
+ /**@format */
2
+ import { TMap } from "./TMap";
3
+ import { PathBase } from "./PathBase";
4
+ /** Tianyu Object calculated different item */
5
+ export interface IObjectDiffInfo {
6
+ /** different item path */
7
+ path: string;
8
+ /** the old value of this path */
9
+ old: any;
10
+ /** the new value of this path */
11
+ new: any;
12
+ /** does the change be deletion */
13
+ deleted?: true;
14
+ /** does the change be adding */
15
+ added?: true;
16
+ }
17
+ /** Different items map */
18
+ export type ObjectDiffMap = TMap<PathBase, IObjectDiffInfo>;
@@ -1,76 +1,76 @@
1
- /**@format */
2
- import { IComparable } from "./Types";
3
- /** Path base class */
4
- export declare class PathBase implements IComparable {
5
- protected _dirs: string[];
6
- /**
7
- * Create a Path instance by specified dirs
8
- *
9
- * @param dirs the specified directories
10
- */
11
- constructor(dirs?: string[]);
12
- /**
13
- * Convert the path instance to string
14
- *
15
- * @returns return the fromatted string
16
- */
17
- toString(): string;
18
- /**
19
- * Iterator of path directories
20
- *
21
- * @returns return an iterator
22
- */
23
- [Symbol.iterator](): {
24
- next: () => {
25
- done: boolean;
26
- value: string;
27
- };
28
- };
29
- /**
30
- * Get a directories array deep copy
31
- *
32
- * @returns return directories
33
- */
34
- getDirs(): string[];
35
- /**
36
- * Get a number that indicates the directories count
37
- *
38
- * @returns return the directories count
39
- */
40
- length(): number;
41
- /**
42
- * Append a new directory to the end of path
43
- *
44
- * @param dir the new directory name
45
- * @returns return the new directories count
46
- */
47
- append(dir: string): number;
48
- /**
49
- * Clean all the pathes
50
- */
51
- clear(): void;
52
- /**
53
- * Remove the end directory of the path instance and return it
54
- *
55
- * @returns return the end of directory
56
- */
57
- pop(): string | undefined;
58
- /**
59
- * Remove the first directory of the path instance and return it
60
- *
61
- * @returns return the first directory
62
- */
63
- shift(): string | undefined;
64
- /**
65
- * Convert the path instance to string for object comparing
66
- *
67
- * @returns return the comparable string
68
- */
69
- getString(): string;
70
- /**
71
- * Get the hashcode of current path
72
- *
73
- * @returns always return 0
74
- */
75
- getHashCode(): number;
76
- }
1
+ /**@format */
2
+ import { IComparable } from "./Types";
3
+ /** Path base class */
4
+ export declare class PathBase implements IComparable {
5
+ protected _dirs: string[];
6
+ /**
7
+ * Create a Path instance by specified dirs
8
+ *
9
+ * @param dirs the specified directories
10
+ */
11
+ constructor(dirs?: string[]);
12
+ /**
13
+ * Convert the path instance to string
14
+ *
15
+ * @returns return the fromatted string
16
+ */
17
+ toString(): string;
18
+ /**
19
+ * Iterator of path directories
20
+ *
21
+ * @returns return an iterator
22
+ */
23
+ [Symbol.iterator](): {
24
+ next: () => {
25
+ done: boolean;
26
+ value: string;
27
+ };
28
+ };
29
+ /**
30
+ * Get a directories array deep copy
31
+ *
32
+ * @returns return directories
33
+ */
34
+ getDirs(): string[];
35
+ /**
36
+ * Get a number that indicates the directories count
37
+ *
38
+ * @returns return the directories count
39
+ */
40
+ length(): number;
41
+ /**
42
+ * Append a new directory to the end of path
43
+ *
44
+ * @param dir the new directory name
45
+ * @returns return the new directories count
46
+ */
47
+ append(dir: string): number;
48
+ /**
49
+ * Clean all the pathes
50
+ */
51
+ clear(): void;
52
+ /**
53
+ * Remove the end directory of the path instance and return it
54
+ *
55
+ * @returns return the end of directory
56
+ */
57
+ pop(): string | undefined;
58
+ /**
59
+ * Remove the first directory of the path instance and return it
60
+ *
61
+ * @returns return the first directory
62
+ */
63
+ shift(): string | undefined;
64
+ /**
65
+ * Convert the path instance to string for object comparing
66
+ *
67
+ * @returns return the comparable string
68
+ */
69
+ getString(): string;
70
+ /**
71
+ * Get the hashcode of current path
72
+ *
73
+ * @returns always return 0
74
+ */
75
+ getHashCode(): number;
76
+ }
@@ -1,23 +1,23 @@
1
- /**@format */
2
- /** Encrypt Option Type */
3
- export declare enum EncryptOption {
4
- Encryption = 0,
5
- Decryption = 1
6
- }
7
- /** An Interface of the Cipher */
8
- export interface ICipher {
9
- /**
10
- * To encode the source value
11
- *
12
- * @param source the source value
13
- * @returns return the encoded value
14
- */
15
- encryption(source: number[]): number[];
16
- /**
17
- * To decode the encoded value
18
- *
19
- * @param source the encoded value
20
- * @returns return the decoded value
21
- */
22
- decryption(source: number[]): number[];
23
- }
1
+ /**@format */
2
+ /** Encrypt Option Type */
3
+ export declare enum EncryptOption {
4
+ Encryption = 0,
5
+ Decryption = 1
6
+ }
7
+ /** An Interface of the Cipher */
8
+ export interface ICipher {
9
+ /**
10
+ * To encode the source value
11
+ *
12
+ * @param source the source value
13
+ * @returns return the encoded value
14
+ */
15
+ encryption(source: number[]): number[];
16
+ /**
17
+ * To decode the encoded value
18
+ *
19
+ * @param source the encoded value
20
+ * @returns return the decoded value
21
+ */
22
+ decryption(source: number[]): number[];
23
+ }
@@ -1,80 +1,80 @@
1
- /**@format */
2
- import { IComparable } from "./Types";
3
- /**
4
- * Tianyu Map
5
- * Support Customized Object type
6
- */
7
- export declare class TMap<K extends IComparable, V> {
8
- private _map;
9
- private _kMap;
10
- /**
11
- * Create an empty Tianyu Map Instance
12
- */
13
- constructor();
14
- /**
15
- * Clean the Map instance
16
- */
17
- clear(): void;
18
- /**
19
- * Delete a specified item from the instance
20
- *
21
- * @param key The key of the item
22
- * @returns return true if deleted successful and return false if failed
23
- */
24
- delete(key: K): boolean;
25
- /**
26
- * Executes a provided function once per each key/value pair in the Map, in insertion order.
27
- *
28
- * @param callbackfn provided execution function
29
- * @param thisArg additional args
30
- */
31
- forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
32
- /**
33
- * Returns a specified element from the Map object. If the value that is associated to the provided key is an object,
34
- * then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
35
- *
36
- * @param key The key of the value
37
- * @returns Returns the element associated with the specified key.
38
- * If no element is associated with the specified key, undefined is returned.
39
- */
40
- get(key: K): V | undefined;
41
- /**
42
- * Get a boolean value indicates whether an element with the specified key exists or not.
43
- *
44
- * @param key The key what wants to search
45
- * @returns return true if the value is found
46
- */
47
- has(key: K): boolean;
48
- /**
49
- * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
50
- *
51
- * @param key The key of new element
52
- * @param value The value of new element
53
- * @returns return the instance that is current instance
54
- */
55
- set(key: K, value: V): this;
56
- /**
57
- * Get a number of elements in the Map
58
- *
59
- * @returns return the count of elements
60
- */
61
- size(): number;
62
- /**
63
- * Get all keys of the Map
64
- *
65
- * @returns return a keys iterator
66
- */
67
- keys(): IterableIterator<K>;
68
- /**
69
- * Get all values of the Map
70
- *
71
- * @returns return a values iterator
72
- */
73
- values(): IterableIterator<V>;
74
- /**
75
- * Get an Iterator of the Map
76
- *
77
- * @returns return an iterator object
78
- */
79
- [Symbol.iterator](): Iterator<[K | undefined, V | undefined]>;
80
- }
1
+ /**@format */
2
+ import { IComparable } from "./Types";
3
+ /**
4
+ * Tianyu Map
5
+ * Support Customized Object type
6
+ */
7
+ export declare class TMap<K extends IComparable, V> {
8
+ private _map;
9
+ private _kMap;
10
+ /**
11
+ * Create an empty Tianyu Map Instance
12
+ */
13
+ constructor();
14
+ /**
15
+ * Clean the Map instance
16
+ */
17
+ clear(): void;
18
+ /**
19
+ * Delete a specified item from the instance
20
+ *
21
+ * @param key The key of the item
22
+ * @returns return true if deleted successful and return false if failed
23
+ */
24
+ delete(key: K): boolean;
25
+ /**
26
+ * Executes a provided function once per each key/value pair in the Map, in insertion order.
27
+ *
28
+ * @param callbackfn provided execution function
29
+ * @param thisArg additional args
30
+ */
31
+ forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
32
+ /**
33
+ * Returns a specified element from the Map object. If the value that is associated to the provided key is an object,
34
+ * then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
35
+ *
36
+ * @param key The key of the value
37
+ * @returns Returns the element associated with the specified key.
38
+ * If no element is associated with the specified key, undefined is returned.
39
+ */
40
+ get(key: K): V | undefined;
41
+ /**
42
+ * Get a boolean value indicates whether an element with the specified key exists or not.
43
+ *
44
+ * @param key The key what wants to search
45
+ * @returns return true if the value is found
46
+ */
47
+ has(key: K): boolean;
48
+ /**
49
+ * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
50
+ *
51
+ * @param key The key of new element
52
+ * @param value The value of new element
53
+ * @returns return the instance that is current instance
54
+ */
55
+ set(key: K, value: V): this;
56
+ /**
57
+ * Get a number of elements in the Map
58
+ *
59
+ * @returns return the count of elements
60
+ */
61
+ size(): number;
62
+ /**
63
+ * Get all keys of the Map
64
+ *
65
+ * @returns return a keys iterator
66
+ */
67
+ keys(): IterableIterator<K>;
68
+ /**
69
+ * Get all values of the Map
70
+ *
71
+ * @returns return a values iterator
72
+ */
73
+ values(): IterableIterator<V>;
74
+ /**
75
+ * Get an Iterator of the Map
76
+ *
77
+ * @returns return an iterator object
78
+ */
79
+ [Symbol.iterator](): Iterator<[K | undefined, V | undefined]>;
80
+ }
@@ -1,25 +1,25 @@
1
- /**@format */
2
- /**A record object type of boolean */
3
- export type MapOfBoolean = Record<string, boolean>;
4
- /**A record object type of string array */
5
- export type MapOfStrings = Record<string, string[]>;
6
- /**A record object type of string */
7
- export type MapOfString = Record<string, string>;
8
- /**A record object type of customized */
9
- export type MapOfType<T> = Record<string, T>;
10
- /** no parameter call back function */
11
- export type CallbackAction = () => void;
12
- /** call back function with customized type parameter */
13
- export type CallbackActionT<T> = (value: T) => void;
14
- /** A key value pair to include a key and a value */
15
- export type KeyValuePair<K, V> = {
16
- key: K;
17
- value: V;
18
- };
19
- /** Tianyu Comparable Interface */
20
- export interface IComparable {
21
- /** Get a string what can indicate the object unified */
22
- getString(): string;
23
- /** Get a number which is the hash value of the object instance */
24
- getHashCode(): number;
25
- }
1
+ /**@format */
2
+ /**A record object type of boolean */
3
+ export type MapOfBoolean = Record<string, boolean>;
4
+ /**A record object type of string array */
5
+ export type MapOfStrings = Record<string, string[]>;
6
+ /**A record object type of string */
7
+ export type MapOfString = Record<string, string>;
8
+ /**A record object type of customized */
9
+ export type MapOfType<T> = Record<string, T>;
10
+ /** no parameter call back function */
11
+ export type CallbackAction = () => void;
12
+ /** call back function with customized type parameter */
13
+ export type CallbackActionT<T> = (value: T) => void;
14
+ /** A key value pair to include a key and a value */
15
+ export interface KeyValuePair<K, V> {
16
+ key: K;
17
+ value: V;
18
+ }
19
+ /** Tianyu Comparable Interface */
20
+ export interface IComparable {
21
+ /** Get a string what can indicate the object unified */
22
+ getString(): string;
23
+ /** Get a number which is the hash value of the object instance */
24
+ getHashCode(): number;
25
+ }
@@ -1,9 +1,9 @@
1
- /**@format */
2
- export { AreaCode } from "./AreaCode";
3
- export { Exception } from "./Exception";
4
- export { LogLevel, type ILog, type IPerfRecorder } from "./Logs";
5
- export { type IObjectDiffInfo, type ObjectDiffMap } from "./Object";
6
- export { PathBase } from "./PathBase";
7
- export { EncryptOption, type ICipher } from "./Security";
8
- export { TMap } from "./TMap";
9
- export { type MapOfBoolean, type MapOfStrings, type MapOfString, type MapOfType, type CallbackAction, type CallbackActionT, type IComparable, } from "./Types";
1
+ /**@format */
2
+ export { AreaCode } from "./AreaCode";
3
+ export { Exception } from "./Exception";
4
+ export { LogLevel, type ILog, type IPerfRecorder } from "./Logs";
5
+ export { type IObjectDiffInfo, type ObjectDiffMap } from "./Object";
6
+ export { PathBase } from "./PathBase";
7
+ export { EncryptOption, type ICipher } from "./Security";
8
+ export { TMap } from "./TMap";
9
+ export { type MapOfBoolean, type MapOfStrings, type MapOfString, type MapOfType, type CallbackAction, type CallbackActionT, type IComparable, } from "./Types";
package/package.json CHANGED
@@ -1,51 +1,57 @@
1
- {
2
- "name": "@aitianyu.cn/types",
3
- "version": "0.0.12",
4
- "private": false,
5
- "description": "Common modules (types, functions, classes) for aitianyu",
6
- "main": "./dist/lib/index.js",
7
- "types": "./dist/types/index.d.ts",
8
- "exports": {
9
- ".": "./dist/lib/index.js",
10
- "./types": "./dist/lib/types/index.js",
11
- "./coding": "./dist/lib/utilities/coding/index.js",
12
- "./core": "./dist/lib/utilities/core/index.js",
13
- "./security": "./dist/lib/utilities/security/index.js"
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "type": "commonjs",
19
- "keywords": [
20
- "aitianyu.cn",
21
- "base type",
22
- "common lib"
23
- ],
24
- "scripts": {
25
- "start": "ts-node packages/index.ts",
26
- "build": "npm run before-build && npm run compiler && npm run copy-lib && npm run copy-types && npm run after-build",
27
- "compiler": "tsc && tsc-alias",
28
- "copy-lib": "copyfiles -u 2 \"build/src/**/*.js\" \"dist/lib\"",
29
- "copy-types": "copyfiles -u 2 \"build/src/**/*.d.ts\" \"dist/types\"",
30
- "before-build": "rimraf ./dist ./build",
31
- "after-build": "rimraf ./build",
32
- "test": "jest --no-cache --verbose",
33
- "test-all": "jest --no-cache --verbose --coverage",
34
- "test-coverage": "jest --no-cache --coverage"
35
- },
36
- "author": "dev@aitianyu.cn",
37
- "license": "ISC",
38
- "devDependencies": {
39
- "@types/jest": "^29.2.4",
40
- "@types/node": "^18.11.15",
41
- "copyfiles": "^2.4.1",
42
- "jest": "^29.3.1",
43
- "jest-html-reporters": "^3.0.11",
44
- "perf_hooks": "0.0.1",
45
- "rimraf": "^3.0.2",
46
- "ts-jest": "^29.0.3",
47
- "ts-node": "^10.9.1",
48
- "tsc-alias": "^1.8.2",
49
- "typescript": "^4.9.3"
50
- }
51
- }
1
+ {
2
+ "name": "@aitianyu.cn/types",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "description": "Common modules (types, functions, classes) for aitianyu",
6
+ "main": "./dist/lib/index.js",
7
+ "types": "./dist/types/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "type": "commonjs",
12
+ "keywords": [
13
+ "aitianyu.cn",
14
+ "base type",
15
+ "common lib"
16
+ ],
17
+ "scripts": {
18
+ "start": "ts-node packages/index.ts",
19
+ "build": "eslint \"./\" --quiet && npm run before-build && npm run compiler && npm run copy-lib && npm run copy-types && npm run after-build",
20
+ "compiler": "tsc && tsc-alias",
21
+ "copy-lib": "copyfiles -u 2 \"build/src/**/*.js\" \"dist/lib\"",
22
+ "copy-types": "copyfiles -u 2 \"build/src/**/*.d.ts\" \"dist/types\"",
23
+ "before-build": "rimraf ./dist ./build",
24
+ "after-build": "rimraf ./build",
25
+ "test": "jest --no-cache --verbose",
26
+ "test-all": "jest --no-cache --verbose --coverage && npm run eslint-report",
27
+ "test-coverage": "jest --no-cache --coverage",
28
+ "eslint": "eslint . --format json --output-file \"./test/__report__/eslint/eslint-report.json\"",
29
+ "eslint-report": "eslint . --format html --output-file \"./test/__report__/eslint/eslint-report.html\""
30
+ },
31
+ "author": "dev@aitianyu.cn",
32
+ "license": "ISC",
33
+ "devDependencies": {
34
+ "@eslint/compat": "^1.3.1",
35
+ "@stylistic/eslint-plugin": "^5.2.2",
36
+ "@types/jest": "^29.2.4",
37
+ "@types/node": "^18.11.15",
38
+ "@types/qrcode": "^1.5.5",
39
+ "@typescript-eslint/eslint-plugin": "^8.38.0",
40
+ "copyfiles": "^2.4.1",
41
+ "eslint": "^9.32.0",
42
+ "eslint-plugin-import": "^2.32.0",
43
+ "jest": "^29.3.1",
44
+ "jest-html-reporters": "^3.0.11",
45
+ "jiti": "^2.5.1",
46
+ "perf_hooks": "0.0.1",
47
+ "rimraf": "^3.0.2",
48
+ "ts-jest": "^29.0.3",
49
+ "ts-node": "^10.9.1",
50
+ "tsc-alias": "^1.8.2",
51
+ "typescript": "^4.9.3",
52
+ "typescript-eslint": "^8.38.0"
53
+ },
54
+ "dependencies": {
55
+ "qrcode": "^1.5.4"
56
+ }
57
+ }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- /**@format */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Path = exports.PathDirAndFileConvertInvaild = exports.PathDirectoryValidationFailException = exports.PathProcessorSourceLostException = void 0;
5
- var Error_1 = require("./Error");
6
- Object.defineProperty(exports, "PathProcessorSourceLostException", { enumerable: true, get: function () { return Error_1.PathProcessorSourceLostException; } });
7
- Object.defineProperty(exports, "PathDirectoryValidationFailException", { enumerable: true, get: function () { return Error_1.PathDirectoryValidationFailException; } });
8
- Object.defineProperty(exports, "PathDirAndFileConvertInvaild", { enumerable: true, get: function () { return Error_1.PathDirAndFileConvertInvaild; } });
9
- var Path_1 = require("./Path");
10
- Object.defineProperty(exports, "Path", { enumerable: true, get: function () { return Path_1.Path; } });
@@ -1,21 +0,0 @@
1
- "use strict";
2
- /**@format */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ObjectHelper = exports.ObjectCalculater = exports.Performance = exports.Log = exports.parseAreaString = exports.parseAreaCode = exports.ObjectDiffMergeFailedException = exports.ObjectDiffApplyInvalidStatusException = exports.ObjectMergeStatusCheckFailedException = exports.ObjectCloneFunctionNotSupportException = exports.ArgumentNullOrEmptyException = void 0;
5
- var Errors_1 = require("./Errors");
6
- Object.defineProperty(exports, "ArgumentNullOrEmptyException", { enumerable: true, get: function () { return Errors_1.ArgumentNullOrEmptyException; } });
7
- Object.defineProperty(exports, "ObjectCloneFunctionNotSupportException", { enumerable: true, get: function () { return Errors_1.ObjectCloneFunctionNotSupportException; } });
8
- Object.defineProperty(exports, "ObjectMergeStatusCheckFailedException", { enumerable: true, get: function () { return Errors_1.ObjectMergeStatusCheckFailedException; } });
9
- Object.defineProperty(exports, "ObjectDiffApplyInvalidStatusException", { enumerable: true, get: function () { return Errors_1.ObjectDiffApplyInvalidStatusException; } });
10
- Object.defineProperty(exports, "ObjectDiffMergeFailedException", { enumerable: true, get: function () { return Errors_1.ObjectDiffMergeFailedException; } });
11
- var Language_1 = require("./Language");
12
- Object.defineProperty(exports, "parseAreaCode", { enumerable: true, get: function () { return Language_1.parseAreaCode; } });
13
- Object.defineProperty(exports, "parseAreaString", { enumerable: true, get: function () { return Language_1.parseAreaString; } });
14
- var Log_1 = require("./Log");
15
- Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return Log_1.Log; } });
16
- Object.defineProperty(exports, "Performance", { enumerable: true, get: function () { return Log_1.Performance; } });
17
- //// object
18
- var Calculater_1 = require("./object/Calculater");
19
- Object.defineProperty(exports, "ObjectCalculater", { enumerable: true, get: function () { return Calculater_1.ObjectCalculater; } });
20
- var Helper_1 = require("./object/Helper");
21
- Object.defineProperty(exports, "ObjectHelper", { enumerable: true, get: function () { return Helper_1.ObjectHelper; } });
@@ -1,22 +0,0 @@
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;