@etsoo/shared 1.2.52 → 1.2.55

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 (106) hide show
  1. package/.github/workflows/main.yml +6 -5
  2. package/__tests__/ArrayUtils.ts +126 -126
  3. package/__tests__/ColorUtils.ts +24 -24
  4. package/__tests__/ContentDisposition.ts +18 -18
  5. package/__tests__/DataTypes.ts +222 -204
  6. package/__tests__/DateUtils.ts +82 -82
  7. package/__tests__/DomUtils.ts +352 -352
  8. package/__tests__/EHistory.ts +62 -62
  9. package/__tests__/ExtendUtils.ts +40 -40
  10. package/__tests__/Keyboard.ts +14 -14
  11. package/__tests__/NumberUtils.ts +37 -39
  12. package/__tests__/StorageUtils.ts +27 -27
  13. package/__tests__/Utils.ts +361 -363
  14. package/__tests__/tsconfig.json +15 -15
  15. package/lib/cjs/ActionResult.d.ts +1 -1
  16. package/lib/cjs/ActionResult.js +3 -3
  17. package/lib/cjs/ArrayUtils.d.ts +1 -1
  18. package/lib/cjs/ArrayUtils.js +4 -4
  19. package/lib/cjs/ColorUtils.d.ts +1 -1
  20. package/lib/cjs/ColorUtils.js +2 -2
  21. package/lib/cjs/DataTypes.d.ts +6 -6
  22. package/lib/cjs/DataTypes.js +50 -51
  23. package/lib/cjs/DateUtils.d.ts +1 -1
  24. package/lib/cjs/DateUtils.js +27 -28
  25. package/lib/cjs/DomUtils.d.ts +3 -3
  26. package/lib/cjs/DomUtils.js +64 -73
  27. package/lib/cjs/ExtendUtils.d.ts +1 -1
  28. package/lib/cjs/ExtendUtils.js +6 -6
  29. package/lib/cjs/IActionResult.d.ts +1 -1
  30. package/lib/cjs/NumberUtils.d.ts +1 -1
  31. package/lib/cjs/NumberUtils.js +9 -9
  32. package/lib/cjs/StorageUtils.js +2 -2
  33. package/lib/cjs/Utils.d.ts +4 -4
  34. package/lib/cjs/Utils.js +58 -62
  35. package/lib/cjs/index.d.ts +22 -22
  36. package/lib/cjs/storage/WindowStorage.d.ts +1 -1
  37. package/lib/cjs/types/ContentDisposition.d.ts +2 -2
  38. package/lib/cjs/types/ContentDisposition.js +11 -13
  39. package/lib/cjs/types/EColor.js +5 -7
  40. package/lib/cjs/types/EHistory.d.ts +3 -3
  41. package/lib/cjs/types/EHistory.js +4 -4
  42. package/lib/cjs/types/ErrorData.d.ts +1 -1
  43. package/lib/cjs/types/EventClass.js +1 -1
  44. package/lib/mjs/ActionResult.d.ts +1 -1
  45. package/lib/mjs/ActionResult.js +3 -3
  46. package/lib/mjs/ArrayUtils.d.ts +1 -1
  47. package/lib/mjs/ArrayUtils.js +5 -5
  48. package/lib/mjs/ColorUtils.d.ts +1 -1
  49. package/lib/mjs/ColorUtils.js +3 -3
  50. package/lib/mjs/DataTypes.d.ts +6 -6
  51. package/lib/mjs/DataTypes.js +50 -51
  52. package/lib/mjs/DateUtils.d.ts +1 -1
  53. package/lib/mjs/DateUtils.js +27 -28
  54. package/lib/mjs/DomUtils.d.ts +3 -3
  55. package/lib/mjs/DomUtils.js +67 -76
  56. package/lib/mjs/ExtendUtils.d.ts +1 -1
  57. package/lib/mjs/ExtendUtils.js +6 -6
  58. package/lib/mjs/IActionResult.d.ts +1 -1
  59. package/lib/mjs/NumberUtils.d.ts +1 -1
  60. package/lib/mjs/NumberUtils.js +9 -9
  61. package/lib/mjs/StorageUtils.js +4 -4
  62. package/lib/mjs/Utils.d.ts +4 -4
  63. package/lib/mjs/Utils.js +61 -65
  64. package/lib/mjs/index.d.ts +22 -22
  65. package/lib/mjs/index.js +22 -22
  66. package/lib/mjs/storage/WindowStorage.d.ts +1 -1
  67. package/lib/mjs/storage/WindowStorage.js +2 -2
  68. package/lib/mjs/types/ContentDisposition.d.ts +2 -2
  69. package/lib/mjs/types/ContentDisposition.js +12 -14
  70. package/lib/mjs/types/EColor.js +5 -7
  71. package/lib/mjs/types/EHistory.d.ts +3 -3
  72. package/lib/mjs/types/EHistory.js +5 -5
  73. package/lib/mjs/types/ErrorData.d.ts +1 -1
  74. package/lib/mjs/types/EventClass.js +1 -1
  75. package/package.json +61 -63
  76. package/src/ActionResult.ts +23 -23
  77. package/src/ArrayUtils.ts +164 -172
  78. package/src/ColorUtils.ts +80 -82
  79. package/src/DataTypes.ts +745 -754
  80. package/src/DateUtils.ts +266 -268
  81. package/src/DomUtils.ts +806 -831
  82. package/src/ExtendUtils.ts +191 -191
  83. package/src/IActionResult.ts +42 -42
  84. package/src/Keyboard.ts +258 -258
  85. package/src/NumberUtils.ts +135 -135
  86. package/src/StorageUtils.ts +117 -117
  87. package/src/Utils.ts +908 -930
  88. package/src/index.ts +22 -22
  89. package/src/node/Storage.ts +53 -53
  90. package/src/storage/IStorage.ts +62 -62
  91. package/src/storage/WindowStorage.ts +140 -140
  92. package/src/types/ContentDisposition.ts +59 -63
  93. package/src/types/DataError.ts +15 -15
  94. package/src/types/DelayedExecutorType.ts +15 -15
  95. package/src/types/EColor.ts +241 -248
  96. package/src/types/EHistory.ts +151 -151
  97. package/src/types/ErrorData.ts +11 -11
  98. package/src/types/EventClass.ts +220 -220
  99. package/src/types/FormData.ts +25 -25
  100. package/src/types/ParsedPath.ts +5 -5
  101. package/tsconfig.cjs.json +16 -16
  102. package/tsconfig.json +16 -16
  103. package/.eslintignore +0 -3
  104. package/.eslintrc.json +0 -29
  105. package/.prettierignore +0 -5
  106. package/.prettierrc +0 -6
@@ -4,55 +4,55 @@
4
4
  * D for data
5
5
  */
6
6
  export abstract class EventBase<T, D> {
7
- private _propagationStopped: boolean = false;
8
- /**
9
- * stopImmediatePropagation called
10
- */
11
- get propagationStopped() {
12
- return this._propagationStopped;
13
- }
14
-
15
- private _timeStamp: number;
16
- /**
17
- * Time stamp
18
- */
19
- get timeStamp() {
20
- return this._timeStamp;
21
- }
22
-
23
- /**
24
- * Constructor
25
- * @param type Type
26
- */
27
- constructor(
28
- public readonly target: {},
29
- public readonly type: T,
30
- public readonly data: D
31
- ) {
32
- this._timeStamp = Date.now();
33
- }
34
-
35
- /**
36
- * Prevent all other listeners from being called
37
- */
38
- stopImmediatePropagation() {
39
- this._propagationStopped = true;
40
- }
7
+ private _propagationStopped: boolean = false;
8
+ /**
9
+ * stopImmediatePropagation called
10
+ */
11
+ get propagationStopped() {
12
+ return this._propagationStopped;
13
+ }
14
+
15
+ private _timeStamp: number;
16
+ /**
17
+ * Time stamp
18
+ */
19
+ get timeStamp() {
20
+ return this._timeStamp;
21
+ }
22
+
23
+ /**
24
+ * Constructor
25
+ * @param type Type
26
+ */
27
+ constructor(
28
+ public readonly target: {},
29
+ public readonly type: T,
30
+ public readonly data: D
31
+ ) {
32
+ this._timeStamp = Date.now();
33
+ }
34
+
35
+ /**
36
+ * Prevent all other listeners from being called
37
+ */
38
+ stopImmediatePropagation() {
39
+ this._propagationStopped = true;
40
+ }
41
41
  }
42
42
 
43
43
  /**
44
44
  * Event options
45
45
  */
46
46
  interface EventOptions {
47
- /**
48
- * A boolean value indicating that events of this type will be dispatched first
49
- */
50
- capture?: boolean;
51
-
52
- /**
53
- * A boolean value indicating that the listener should be invoked at most once after being added
54
- */
55
- once?: boolean;
47
+ /**
48
+ * A boolean value indicating that events of this type will be dispatched first
49
+ */
50
+ capture?: boolean;
51
+
52
+ /**
53
+ * A boolean value indicating that the listener should be invoked at most once after being added
54
+ */
55
+ once?: boolean;
56
56
  }
57
57
 
58
58
  type EventClassDef = { [key: string]: object };
@@ -63,196 +63,196 @@ type EventClassDef = { [key: string]: object };
63
63
  * D for data
64
64
  */
65
65
  export abstract class EventClass<D extends EventClassDef> {
66
- // Listeners
67
- private readonly listeners = new Map<
68
- keyof D,
69
- [(event: EventBase<keyof D, D[keyof D]>) => void, EventOptions?][]
70
- >();
71
-
72
- /**
73
- * Has specific type events
74
- * @param type Type
75
- */
76
- hasEvents<T extends keyof D>(type: T): boolean;
77
-
78
- /**
79
- * Has specific type and callback events
80
- * @param type Type
81
- * @param callback Callback
82
- */
83
- hasEvents<T extends keyof D>(
84
- type: T,
85
- callback: (event: EventBase<T, D[T]>) => void
86
- ): boolean;
87
-
88
- /**
89
- * Has specific type and callback events
90
- * @param type Type
91
- * @param callback Callback
92
- * @returns Result
93
- */
94
- hasEvents<T extends keyof D>(
95
- type: T,
96
- callback?: (event: EventBase<T, D[T]>) => void
97
- ) {
98
- const items = this.listeners.get(type);
99
- if (items == null || items.length === 0) return false;
100
-
101
- if (callback) {
102
- return items.some((item) => item[0] == callback);
103
- }
104
-
105
- return true;
66
+ // Listeners
67
+ private readonly listeners = new Map<
68
+ keyof D,
69
+ [(event: EventBase<keyof D, D[keyof D]>) => void, EventOptions?][]
70
+ >();
71
+
72
+ /**
73
+ * Has specific type events
74
+ * @param type Type
75
+ */
76
+ hasEvents<T extends keyof D>(type: T): boolean;
77
+
78
+ /**
79
+ * Has specific type and callback events
80
+ * @param type Type
81
+ * @param callback Callback
82
+ */
83
+ hasEvents<T extends keyof D>(
84
+ type: T,
85
+ callback: (event: EventBase<T, D[T]>) => void
86
+ ): boolean;
87
+
88
+ /**
89
+ * Has specific type and callback events
90
+ * @param type Type
91
+ * @param callback Callback
92
+ * @returns Result
93
+ */
94
+ hasEvents<T extends keyof D>(
95
+ type: T,
96
+ callback?: (event: EventBase<T, D[T]>) => void
97
+ ) {
98
+ const items = this.listeners.get(type);
99
+ if (items == null || items.length === 0) return false;
100
+
101
+ if (callback) {
102
+ return items.some((item) => item[0] == callback);
106
103
  }
107
104
 
108
- /**
109
- * Remove all specific type events
110
- * @param type Type
111
- */
112
- off<T extends keyof D>(type: T): void;
113
-
114
- /**
115
- * Remove specific type and callback event
116
- * @param type Type
117
- * @param callback Callback
118
- */
119
- off<T extends keyof D>(
120
- type: T,
121
- callback: (event: EventBase<T, D[T]>) => void
122
- ): void;
123
-
124
- /**
125
- * Remove specific type and callback event
126
- * @param type Type
127
- * @param callback Callback
128
- */
129
- off<T extends keyof D>(
130
- type: T,
131
- callback?: (event: EventBase<T, D[T]>) => void
132
- ) {
133
- if (callback == null) {
134
- this.listeners.delete(type);
135
- return;
136
- }
137
-
138
- const items = this.listeners.get(type);
139
- if (items == null) return;
140
-
141
- for (let i = items.length - 1; i >= 0; i--) {
142
- if (items[i][0] == callback) {
143
- items.splice(i, 1);
144
- }
145
- }
105
+ return true;
106
+ }
107
+
108
+ /**
109
+ * Remove all specific type events
110
+ * @param type Type
111
+ */
112
+ off<T extends keyof D>(type: T): void;
113
+
114
+ /**
115
+ * Remove specific type and callback event
116
+ * @param type Type
117
+ * @param callback Callback
118
+ */
119
+ off<T extends keyof D>(
120
+ type: T,
121
+ callback: (event: EventBase<T, D[T]>) => void
122
+ ): void;
123
+
124
+ /**
125
+ * Remove specific type and callback event
126
+ * @param type Type
127
+ * @param callback Callback
128
+ */
129
+ off<T extends keyof D>(
130
+ type: T,
131
+ callback?: (event: EventBase<T, D[T]>) => void
132
+ ) {
133
+ if (callback == null) {
134
+ this.listeners.delete(type);
135
+ return;
146
136
  }
147
137
 
148
- /**
149
- * Add event listeners
150
- * @param collection Collection of events
151
- */
152
- on(collection: {
153
- [type in keyof D]: (event: EventBase<type, D[type]>) => void;
154
- }): void;
155
-
156
- /**
157
- * Add event listener
158
- * @param type Type
159
- * @param callback Callback
160
- * @param options Options
161
- */
162
- on<T extends keyof D>(
163
- type: T,
164
- callback: (event: EventBase<T, D[T]>) => void,
165
- options?: EventOptions
166
- ): void;
167
-
168
- /**
169
- * Add events
170
- * @param type Type
171
- * @param callback Callback
172
- * @param options Options
173
- */
174
- on<T extends keyof D>(
175
- type:
176
- | {
177
- [type in keyof D]: (event: EventBase<type, D[type]>) => void;
178
- }
179
- | T,
180
- callback?: (event: EventBase<T, D[T]>) => void,
181
- options?: EventOptions
182
- ) {
183
- if (typeof type === 'object') {
184
- for (const key in type) {
185
- const item = key as keyof D;
186
- const itemCallback = type[item] ?? callback;
187
- if (itemCallback) this.on(item, itemCallback, options);
188
- }
189
- return;
190
- }
191
-
192
- if (callback == null) return;
193
- this.listeners.has(type) || this.listeners.set(type, []);
138
+ const items = this.listeners.get(type);
139
+ if (items == null) return;
194
140
 
195
- // String to T conversion problem
196
- // "keyofStringsOnly": true could solve part of it
197
- this.listeners.get(type)?.push([callback as any, options]);
141
+ for (let i = items.length - 1; i >= 0; i--) {
142
+ if (items[i][0] == callback) {
143
+ items.splice(i, 1);
144
+ }
198
145
  }
199
-
200
- /**
201
- * Trigger event
202
- * @param event Event
203
- */
204
- trigger<T extends keyof D>(event: EventBase<T, D[T]>) {
205
- const items = this.listeners.get(event.type);
206
- if (items == null) return;
207
-
208
- // Len
209
- const len = items.length;
210
- if (len === 0) return;
211
-
212
- // Need to be removed indicies
213
- const indicies: number[] = [];
214
-
215
- // Capture items first
216
- let stopped: boolean = false;
217
- for (let c = 0; c < len; c++) {
218
- const item = items[c];
219
- const [callback, options] = item;
220
- if (options == null || !options.capture) continue;
221
-
222
- callback(event);
223
-
224
- if (options.once) {
225
- indicies.push(c);
226
- }
227
-
228
- if (event.propagationStopped) {
229
- stopped = true;
230
- break;
231
- }
146
+ }
147
+
148
+ /**
149
+ * Add event listeners
150
+ * @param collection Collection of events
151
+ */
152
+ on(collection: {
153
+ [type in keyof D]: (event: EventBase<type, D[type]>) => void;
154
+ }): void;
155
+
156
+ /**
157
+ * Add event listener
158
+ * @param type Type
159
+ * @param callback Callback
160
+ * @param options Options
161
+ */
162
+ on<T extends keyof D>(
163
+ type: T,
164
+ callback: (event: EventBase<T, D[T]>) => void,
165
+ options?: EventOptions
166
+ ): void;
167
+
168
+ /**
169
+ * Add events
170
+ * @param type Type
171
+ * @param callback Callback
172
+ * @param options Options
173
+ */
174
+ on<T extends keyof D>(
175
+ type:
176
+ | {
177
+ [type in keyof D]: (event: EventBase<type, D[type]>) => void;
232
178
  }
179
+ | T,
180
+ callback?: (event: EventBase<T, D[T]>) => void,
181
+ options?: EventOptions
182
+ ) {
183
+ if (typeof type === "object") {
184
+ for (const key in type) {
185
+ const item = key as keyof D;
186
+ const itemCallback = type[item] ?? callback;
187
+ if (itemCallback) this.on(item, itemCallback, options);
188
+ }
189
+ return;
190
+ }
233
191
 
234
- if (!stopped) {
235
- for (let c = 0; c < len; c++) {
236
- const item = items[c];
237
- const [callback, options] = item;
238
- if (options?.capture) continue;
192
+ if (callback == null) return;
193
+ this.listeners.has(type) || this.listeners.set(type, []);
194
+
195
+ // String to T conversion problem
196
+ // "keyofStringsOnly": true could solve part of it
197
+ this.listeners.get(type)?.push([callback as any, options]);
198
+ }
199
+
200
+ /**
201
+ * Trigger event
202
+ * @param event Event
203
+ */
204
+ trigger<T extends keyof D>(event: EventBase<T, D[T]>) {
205
+ const items = this.listeners.get(event.type);
206
+ if (items == null) return;
207
+
208
+ // Len
209
+ const len = items.length;
210
+ if (len === 0) return;
211
+
212
+ // Need to be removed indicies
213
+ const indicies: number[] = [];
214
+
215
+ // Capture items first
216
+ let stopped: boolean = false;
217
+ for (let c = 0; c < len; c++) {
218
+ const item = items[c];
219
+ const [callback, options] = item;
220
+ if (options == null || !options.capture) continue;
221
+
222
+ callback(event);
223
+
224
+ if (options.once) {
225
+ indicies.push(c);
226
+ }
227
+
228
+ if (event.propagationStopped) {
229
+ stopped = true;
230
+ break;
231
+ }
232
+ }
239
233
 
240
- callback(event);
234
+ if (!stopped) {
235
+ for (let c = 0; c < len; c++) {
236
+ const item = items[c];
237
+ const [callback, options] = item;
238
+ if (options?.capture) continue;
241
239
 
242
- if (options?.once) {
243
- indicies.push(c);
244
- }
240
+ callback(event);
245
241
 
246
- if (event.propagationStopped) {
247
- stopped = true;
248
- break;
249
- }
250
- }
242
+ if (options?.once) {
243
+ indicies.push(c);
251
244
  }
252
245
 
253
- // Remove all once handlers
254
- for (let i = indicies.length - 1; i >= 0; i--) {
255
- items.splice(indicies[i], 1);
246
+ if (event.propagationStopped) {
247
+ stopped = true;
248
+ break;
256
249
  }
250
+ }
251
+ }
252
+
253
+ // Remove all once handlers
254
+ for (let i = indicies.length - 1; i >= 0; i--) {
255
+ items.splice(indicies[i], 1);
257
256
  }
257
+ }
258
258
  }
@@ -2,25 +2,25 @@
2
2
  * File like interface
3
3
  */
4
4
  export interface IFile {
5
- /**
6
- * Name of the file
7
- */
8
- readonly name: string;
5
+ /**
6
+ * Name of the file
7
+ */
8
+ readonly name: string;
9
9
 
10
- /**
11
- * Size of the file in bytes
12
- */
13
- readonly size: number;
10
+ /**
11
+ * Size of the file in bytes
12
+ */
13
+ readonly size: number;
14
14
 
15
- /**
16
- * MIME type
17
- */
18
- readonly type: string;
15
+ /**
16
+ * MIME type
17
+ */
18
+ readonly type: string;
19
19
 
20
- /**
21
- * Last modified time of the file, in millisecond since the UNIX epoch
22
- */
23
- readonly lastModified: number;
20
+ /**
21
+ * Last modified time of the file, in millisecond since the UNIX epoch
22
+ */
23
+ readonly lastModified: number;
24
24
  }
25
25
 
26
26
  /**
@@ -33,13 +33,13 @@ export type FormDataFieldValue = string | IFile;
33
33
  * https://developer.mozilla.org/en-US/docs/Web/API/FormData
34
34
  */
35
35
  export interface IFormData {
36
- append(name: string, value: unknown, filename?: string): void;
37
- delete(name: string): void;
38
- entries(): IterableIterator<[string, FormDataEntryValue]>;
39
- set(name: string, value: unknown, filename?: string): void;
40
- get(name: string): FormDataFieldValue | null;
41
- getAll(name: string): FormDataFieldValue[];
42
- has(name: string): boolean;
43
- keys(): IterableIterator<string>;
44
- values(): IterableIterator<FormDataEntryValue>;
36
+ append(name: string, value: unknown, filename?: string): void;
37
+ delete(name: string): void;
38
+ entries(): IterableIterator<[string, FormDataEntryValue]>;
39
+ set(name: string, value: unknown, filename?: string): void;
40
+ get(name: string): FormDataFieldValue | null;
41
+ getAll(name: string): FormDataFieldValue[];
42
+ has(name: string): boolean;
43
+ keys(): IterableIterator<string>;
44
+ values(): IterableIterator<FormDataEntryValue>;
45
45
  }
@@ -2,9 +2,9 @@
2
2
  * Similar result with node.js path.parse(path)
3
3
  */
4
4
  export type ParsedPath = {
5
- root: string;
6
- dir: string;
7
- base: string;
8
- ext: string;
9
- name: string;
5
+ root: string;
6
+ dir: string;
7
+ base: string;
8
+ ext: string;
9
+ name: string;
10
10
  };
package/tsconfig.cjs.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
- "target": "ES2020",
5
- "module": "NodeNext",
6
- "moduleResolution": "NodeNext",
7
- "isolatedModules": true,
8
- "outDir": "./lib/cjs",
9
- "noEmit": false,
10
- "declaration": true,
11
- "strict": true,
12
- "esModuleInterop": true,
13
- "skipLibCheck": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "lib": ["dom", "dom.iterable", "ESNext"]
16
- },
17
- "include": ["src"]
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+ "target": "ES2020",
5
+ "module": "NodeNext",
6
+ "moduleResolution": "NodeNext",
7
+ "isolatedModules": true,
8
+ "outDir": "./lib/cjs",
9
+ "noEmit": false,
10
+ "declaration": true,
11
+ "strict": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "lib": ["dom", "dom.iterable", "ESNext"]
16
+ },
17
+ "include": ["src"]
18
18
  }
package/tsconfig.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
- "target": "ES2020",
5
- "module": "ESNext",
6
- "moduleResolution": "Node10",
7
- "isolatedModules": true,
8
- "outDir": "./lib/mjs",
9
- "noEmit": false,
10
- "declaration": true,
11
- "strict": true,
12
- "esModuleInterop": true,
13
- "skipLibCheck": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "lib": ["dom", "dom.iterable", "esnext"]
16
- },
17
- "include": ["src"]
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
+ "target": "ES2020",
5
+ "module": "ESNext",
6
+ "moduleResolution": "Node10",
7
+ "isolatedModules": true,
8
+ "outDir": "./lib/mjs",
9
+ "noEmit": false,
10
+ "declaration": true,
11
+ "strict": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "lib": ["dom", "dom.iterable", "esnext"]
16
+ },
17
+ "include": ["src"]
18
18
  }
package/.eslintignore DELETED
@@ -1,3 +0,0 @@
1
- .github
2
- node_modules
3
- lib/
package/.eslintrc.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "node": true,
5
- "es6": true,
6
- "jest": true
7
- },
8
- "extends": ["airbnb-base", "prettier"],
9
- "parser": "@typescript-eslint/parser",
10
- "parserOptions": {
11
- "ecmaVersion": 6,
12
- "sourceType": "module"
13
- },
14
- "plugins": ["@typescript-eslint"],
15
- "rules": {
16
- "class-methods-use-this": "off",
17
- "import/extensions": ["error", "never"],
18
- "import/prefer-default-export": "off",
19
- "@typescript-eslint/no-unused-vars": ["error"]
20
- },
21
- "settings": {
22
- "import/resolver": {
23
- "node": {
24
- "paths": ["src"],
25
- "extensions": [".ts"]
26
- }
27
- }
28
- }
29
- }
package/.prettierignore DELETED
@@ -1,5 +0,0 @@
1
- .github
2
- node_modules
3
- lib/
4
- package-lock.json
5
- README.md
package/.prettierrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "trailingComma": "none",
3
- "tabWidth": 4,
4
- "semi": true,
5
- "singleQuote": true
6
- }