@arc-js/id-generator 0.0.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.
- package/README.md +547 -0
- package/index.ts +560 -0
- package/js/index.js +422 -0
- package/package.json +18 -0
- package/tsconfig.json +27 -0
- package/web/id-generator.js +412 -0
- package/web/id-generator.min.js +1 -0
package/js/index.js
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
const globalFunct = (function (global) {
|
|
2
|
+
'use strict';
|
|
3
|
+
class IdentifierGenerator {
|
|
4
|
+
static instance;
|
|
5
|
+
cache = new Map();
|
|
6
|
+
constructor() { }
|
|
7
|
+
static getInstance() {
|
|
8
|
+
if (!IdentifierGenerator.instance) {
|
|
9
|
+
IdentifierGenerator.instance = new IdentifierGenerator();
|
|
10
|
+
}
|
|
11
|
+
return IdentifierGenerator.instance;
|
|
12
|
+
}
|
|
13
|
+
generate(format, customHandlers = {}) {
|
|
14
|
+
const tokens = this.parseFormat(format);
|
|
15
|
+
return tokens.map(token => this.resolveToken(token, customHandlers)).join('');
|
|
16
|
+
}
|
|
17
|
+
parseFormat(format) {
|
|
18
|
+
const tokens = [];
|
|
19
|
+
let currentIndex = 0;
|
|
20
|
+
while (currentIndex < format.length) {
|
|
21
|
+
const nextHashIndex = format.indexOf('#', currentIndex);
|
|
22
|
+
if (nextHashIndex > currentIndex) {
|
|
23
|
+
tokens.push({
|
|
24
|
+
type: 'string',
|
|
25
|
+
value: format.substring(currentIndex, nextHashIndex)
|
|
26
|
+
});
|
|
27
|
+
currentIndex = nextHashIndex;
|
|
28
|
+
}
|
|
29
|
+
if (format[currentIndex] === '#') {
|
|
30
|
+
const tokenEnd = this.findTokenEnd(format, currentIndex + 1);
|
|
31
|
+
if (tokenEnd === -1) {
|
|
32
|
+
throw new Error(`Format invalide à la position ${currentIndex}`);
|
|
33
|
+
}
|
|
34
|
+
const tokenContent = format.substring(currentIndex + 1, tokenEnd);
|
|
35
|
+
const token = this.parseToken(tokenContent);
|
|
36
|
+
tokens.push(token);
|
|
37
|
+
currentIndex = tokenEnd;
|
|
38
|
+
}
|
|
39
|
+
else if (nextHashIndex === -1) {
|
|
40
|
+
tokens.push({
|
|
41
|
+
type: 'string',
|
|
42
|
+
value: format.substring(currentIndex)
|
|
43
|
+
});
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return tokens;
|
|
48
|
+
}
|
|
49
|
+
findTokenEnd(format, startIndex) {
|
|
50
|
+
let braceCount = 0;
|
|
51
|
+
let inString = false;
|
|
52
|
+
let escapeNext = false;
|
|
53
|
+
for (let i = startIndex; i < format.length; i++) {
|
|
54
|
+
const char = format[i];
|
|
55
|
+
if (escapeNext) {
|
|
56
|
+
escapeNext = false;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (char === '\\') {
|
|
60
|
+
escapeNext = true;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (char === '"' || char === "'") {
|
|
64
|
+
inString = !inString;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (!inString) {
|
|
68
|
+
if (char === '{') {
|
|
69
|
+
braceCount++;
|
|
70
|
+
}
|
|
71
|
+
else if (char === '}') {
|
|
72
|
+
if (braceCount === 0) {
|
|
73
|
+
return i;
|
|
74
|
+
}
|
|
75
|
+
braceCount--;
|
|
76
|
+
}
|
|
77
|
+
else if (char === '#' && braceCount === 0) {
|
|
78
|
+
return i;
|
|
79
|
+
}
|
|
80
|
+
else if (/[a-zA-Z0-9]/.test(char) === false && char !== ',' && char !== ':' && char !== '-' && char !== '_' && braceCount === 0) {
|
|
81
|
+
return i;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return format.length;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Parse un token individuel
|
|
89
|
+
*/
|
|
90
|
+
parseToken(tokenContent) {
|
|
91
|
+
// Token personnalisé simple
|
|
92
|
+
if (tokenContent.includes('{') === false) {
|
|
93
|
+
return { type: 'string', value: tokenContent };
|
|
94
|
+
}
|
|
95
|
+
const [type, optionsStr] = tokenContent.split('{', 2);
|
|
96
|
+
const optionsContent = optionsStr.slice(0, -1); // Retirer le '}'
|
|
97
|
+
if (type === 'rand') {
|
|
98
|
+
return {
|
|
99
|
+
type: 'random',
|
|
100
|
+
value: this.parseRandomOptions(optionsContent)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
else if (type === 'uuid') {
|
|
104
|
+
return {
|
|
105
|
+
type: 'uuid',
|
|
106
|
+
value: this.parseUUIDOptions(optionsContent)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
else if (type === 'custom') {
|
|
110
|
+
return {
|
|
111
|
+
type: 'custom',
|
|
112
|
+
value: optionsContent
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
throw new Error(`Type de token non supporté: ${type}`);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Parse les options pour un random string
|
|
119
|
+
*/
|
|
120
|
+
parseRandomOptions(optionsStr) {
|
|
121
|
+
const defaults = {
|
|
122
|
+
size: 8,
|
|
123
|
+
type: 'alphanumeric',
|
|
124
|
+
variant: false
|
|
125
|
+
};
|
|
126
|
+
const options = this.parseOptions(optionsStr);
|
|
127
|
+
return {
|
|
128
|
+
size: options.size ? parseInt(options.size) : defaults.size,
|
|
129
|
+
type: options.type || defaults.type,
|
|
130
|
+
variant: options.variant === 'true' ? true : defaults.variant
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Parse les options pour un UUID
|
|
135
|
+
*/
|
|
136
|
+
parseUUIDOptions(optionsStr) {
|
|
137
|
+
const defaults = {
|
|
138
|
+
version: 'v4'
|
|
139
|
+
};
|
|
140
|
+
const options = this.parseOptions(optionsStr);
|
|
141
|
+
return {
|
|
142
|
+
version: options.version || defaults.version
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Parse une chaîne d'options key:value
|
|
147
|
+
*/
|
|
148
|
+
parseOptions(optionsStr) {
|
|
149
|
+
const options = {};
|
|
150
|
+
let currentKey = '';
|
|
151
|
+
let currentValue = '';
|
|
152
|
+
let inString = false;
|
|
153
|
+
let stringChar = '';
|
|
154
|
+
let braceCount = 0;
|
|
155
|
+
for (let i = 0; i < optionsStr.length; i++) {
|
|
156
|
+
const char = optionsStr[i];
|
|
157
|
+
if (char === '"' || char === "'") {
|
|
158
|
+
if (!inString) {
|
|
159
|
+
inString = true;
|
|
160
|
+
stringChar = char;
|
|
161
|
+
}
|
|
162
|
+
else if (stringChar === char) {
|
|
163
|
+
inString = false;
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
currentValue += char;
|
|
167
|
+
}
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (inString) {
|
|
171
|
+
currentValue += char;
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (char === ':') {
|
|
175
|
+
if (braceCount === 0) {
|
|
176
|
+
currentKey = currentValue.trim();
|
|
177
|
+
currentValue = '';
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
else if (char === '{') {
|
|
182
|
+
braceCount++;
|
|
183
|
+
}
|
|
184
|
+
else if (char === '}') {
|
|
185
|
+
braceCount--;
|
|
186
|
+
}
|
|
187
|
+
else if (char === ',' && braceCount === 0) {
|
|
188
|
+
options[currentKey] = currentValue.trim();
|
|
189
|
+
currentKey = '';
|
|
190
|
+
currentValue = '';
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
currentValue += char;
|
|
194
|
+
}
|
|
195
|
+
if (currentKey) {
|
|
196
|
+
options[currentKey] = currentValue.trim();
|
|
197
|
+
}
|
|
198
|
+
return options;
|
|
199
|
+
}
|
|
200
|
+
resolveToken(token, customHandlers) {
|
|
201
|
+
switch (token.type) {
|
|
202
|
+
case 'string':
|
|
203
|
+
return token.value;
|
|
204
|
+
case 'random':
|
|
205
|
+
return this.generateRandomString(token.value);
|
|
206
|
+
case 'uuid':
|
|
207
|
+
return this.generateUUID(token.value);
|
|
208
|
+
case 'custom':
|
|
209
|
+
const handlerName = token.value.split('}').join('').split('{').join('');
|
|
210
|
+
const checker = Object.keys(customHandlers).includes(handlerName);
|
|
211
|
+
if (checker) {
|
|
212
|
+
return customHandlers[handlerName]();
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
console.log(`[id-generator -> id-generator] IdentifierGenerator | resolveToken - custom - token:: `, token);
|
|
216
|
+
console.log(`[id-generator -> id-generator] IdentifierGenerator | resolveToken - custom - handlerName:: `, handlerName);
|
|
217
|
+
console.log(`[id-generator -> id-generator] IdentifierGenerator | resolveToken - custom - checker:: `, checker);
|
|
218
|
+
console.log(`[id-generator -> id-generator] IdentifierGenerator | resolveToken - custom - Object.keys(customHandlers):: `, Object.keys(customHandlers));
|
|
219
|
+
console.log(`[id-generator -> id-generator] IdentifierGenerator | resolveToken - custom - customHandlers:: `, customHandlers);
|
|
220
|
+
throw new Error(`Handler personnalisé non trouvé: ${handlerName}`);
|
|
221
|
+
}
|
|
222
|
+
default:
|
|
223
|
+
throw new Error(`Type de token inconnu: ${token.type}`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
generateRandomString(options) {
|
|
227
|
+
const cacheKey = this.getRandomCacheKey(options);
|
|
228
|
+
if (!options.variant) {
|
|
229
|
+
if (!this.cache.has('random')) {
|
|
230
|
+
this.cache.set('random', new Map());
|
|
231
|
+
}
|
|
232
|
+
const randomCache = this.cache.get('random');
|
|
233
|
+
if (randomCache.has(cacheKey)) {
|
|
234
|
+
return randomCache.get(cacheKey);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
let charset = '';
|
|
238
|
+
let result = '';
|
|
239
|
+
switch (options.type) {
|
|
240
|
+
case 'numeric':
|
|
241
|
+
charset = '0123456789';
|
|
242
|
+
break;
|
|
243
|
+
case 'alphabetic':
|
|
244
|
+
charset = 'abcdefghijklmnopqrstuvwxyz';
|
|
245
|
+
break;
|
|
246
|
+
case 'alphabetic-case':
|
|
247
|
+
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
248
|
+
break;
|
|
249
|
+
case 'alphanumeric':
|
|
250
|
+
charset = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
|
251
|
+
break;
|
|
252
|
+
case 'alphanumeric-case':
|
|
253
|
+
charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
const randomValues = new Uint32Array(options.size);
|
|
257
|
+
crypto.getRandomValues(randomValues);
|
|
258
|
+
for (let i = 0; i < options.size; i++) {
|
|
259
|
+
result += charset[randomValues[i] % charset.length];
|
|
260
|
+
}
|
|
261
|
+
if (!options.variant) {
|
|
262
|
+
this.cache.get('random').set(cacheKey, result);
|
|
263
|
+
}
|
|
264
|
+
return result;
|
|
265
|
+
}
|
|
266
|
+
generateUUID(options) {
|
|
267
|
+
const cacheKey = `uuid-${options.version}`;
|
|
268
|
+
if (!this.cache.has('uuid')) {
|
|
269
|
+
this.cache.set('uuid', new Map());
|
|
270
|
+
}
|
|
271
|
+
const uuidCache = this.cache.get('uuid');
|
|
272
|
+
if (uuidCache.has(cacheKey)) {
|
|
273
|
+
if (options.version === 'v4') {
|
|
274
|
+
return this.generateUUIDv4();
|
|
275
|
+
}
|
|
276
|
+
return uuidCache.get(cacheKey);
|
|
277
|
+
}
|
|
278
|
+
let uuid;
|
|
279
|
+
switch (options.version) {
|
|
280
|
+
case 'v1':
|
|
281
|
+
uuid = this.generateUUIDv1();
|
|
282
|
+
break;
|
|
283
|
+
case 'v2':
|
|
284
|
+
uuid = this.generateUUIDv2();
|
|
285
|
+
break;
|
|
286
|
+
case 'v3':
|
|
287
|
+
uuid = this.generateUUIDv3();
|
|
288
|
+
break;
|
|
289
|
+
case 'v4':
|
|
290
|
+
uuid = this.generateUUIDv4();
|
|
291
|
+
break;
|
|
292
|
+
case 'v5':
|
|
293
|
+
uuid = this.generateUUIDv5();
|
|
294
|
+
break;
|
|
295
|
+
default:
|
|
296
|
+
uuid = this.generateUUIDv4();
|
|
297
|
+
}
|
|
298
|
+
if (options.version === 'v3' || options.version === 'v5') {
|
|
299
|
+
uuidCache.set(cacheKey, uuid);
|
|
300
|
+
}
|
|
301
|
+
return uuid;
|
|
302
|
+
}
|
|
303
|
+
generateUUIDv1() {
|
|
304
|
+
const now = Date.now();
|
|
305
|
+
const hexTime = now.toString(16).padStart(12, '0');
|
|
306
|
+
return `${hexTime.slice(0, 8)}-${hexTime.slice(8, 12)}-1000-8000-${this.getRandomHex(12)}`;
|
|
307
|
+
}
|
|
308
|
+
generateUUIDv2() {
|
|
309
|
+
return this.generateUUIDv1();
|
|
310
|
+
}
|
|
311
|
+
generateUUIDv3() {
|
|
312
|
+
const namespace = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
313
|
+
const name = 'default';
|
|
314
|
+
return 'xxxxxxxx-xxxx-3xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
315
|
+
const r = Math.random() * 16 | 0;
|
|
316
|
+
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
317
|
+
return v.toString(16);
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
generateUUIDv4() {
|
|
321
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
322
|
+
const r = crypto.getRandomValues(new Uint8Array(1))[0] % 16 | 0;
|
|
323
|
+
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
324
|
+
return v.toString(16);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
generateUUIDv5() {
|
|
328
|
+
const namespace = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
329
|
+
const name = 'default';
|
|
330
|
+
return 'xxxxxxxx-xxxx-5xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
331
|
+
const r = Math.random() * 16 | 0;
|
|
332
|
+
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
333
|
+
return v.toString(16);
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
getRandomHex(size) {
|
|
337
|
+
const bytes = new Uint8Array(Math.ceil(size / 2));
|
|
338
|
+
crypto.getRandomValues(bytes);
|
|
339
|
+
return Array.from(bytes)
|
|
340
|
+
.map(b => b.toString(16).padStart(2, '0'))
|
|
341
|
+
.join('')
|
|
342
|
+
.slice(0, size);
|
|
343
|
+
}
|
|
344
|
+
getRandomCacheKey(options) {
|
|
345
|
+
return `${options.size}-${options.type}-${options.variant}`;
|
|
346
|
+
}
|
|
347
|
+
clearCache() {
|
|
348
|
+
this.cache.clear();
|
|
349
|
+
}
|
|
350
|
+
static generateId(format, customHandlers = {}) {
|
|
351
|
+
return this.getInstance().generate(format, customHandlers);
|
|
352
|
+
}
|
|
353
|
+
static exposeToGlobal() {
|
|
354
|
+
if (typeof window !== 'undefined') {
|
|
355
|
+
window.IdentifierGenerator = IdentifierGenerator;
|
|
356
|
+
window.IdentifierGeneratorHandlers = IdentifierGeneratorHandlers;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const IdentifierGeneratorHandlers = {
|
|
361
|
+
timestamp: () => Date.now().toString(),
|
|
362
|
+
date: () => new Date().toISOString().slice(0, 10).replace(/-/g, ''),
|
|
363
|
+
time: () => new Date().toISOString().slice(11, 19).replace(/:/g, ''),
|
|
364
|
+
counter: (() => {
|
|
365
|
+
let count = 0;
|
|
366
|
+
return () => (++count).toString().padStart(6, '0');
|
|
367
|
+
})(),
|
|
368
|
+
env: (envVar) => process.env[envVar] || ''
|
|
369
|
+
};
|
|
370
|
+
if (typeof window !== 'undefined') {
|
|
371
|
+
window.IdentifierGenerator = IdentifierGenerator;
|
|
372
|
+
window.IdentifierGeneratorHandlers = IdentifierGeneratorHandlers;
|
|
373
|
+
}
|
|
374
|
+
export default {
|
|
375
|
+
IdentifierGenerator,
|
|
376
|
+
IdentifierGeneratorHandlers,
|
|
377
|
+
};
|
|
378
|
+
const globalFunctModule = {
|
|
379
|
+
default: {},
|
|
380
|
+
IdentifierGenerator: IdentifierGenerator,
|
|
381
|
+
IdentifierGeneratorHandlers: IdentifierGeneratorHandlers,
|
|
382
|
+
};
|
|
383
|
+
globalFunctModule.default = { ...(globalFunctModule?.default || {}), IdentifierGenerator: IdentifierGenerator };
|
|
384
|
+
globalFunctModule.default = { ...(globalFunctModule?.default || {}), IdentifierGeneratorHandlers: IdentifierGeneratorHandlers };
|
|
385
|
+
const __bundledModules = globalFunctModule;
|
|
386
|
+
if (typeof global !== 'undefined') {
|
|
387
|
+
global.IdentifierGenerator = IdentifierGenerator;
|
|
388
|
+
global.IdentifierGeneratorHandlers = IdentifierGeneratorHandlers;
|
|
389
|
+
global.__bundledModules = __bundledModules;
|
|
390
|
+
}
|
|
391
|
+
if (typeof window !== "undefined") {
|
|
392
|
+
window.IdentifierGenerator = IdentifierGenerator;
|
|
393
|
+
window.IdentifierGeneratorHandlers = IdentifierGeneratorHandlers;
|
|
394
|
+
window.__bundledModules = __bundledModules;
|
|
395
|
+
}
|
|
396
|
+
if (typeof module !== 'undefined' && module.exports) {
|
|
397
|
+
module.exports = __bundledModules;
|
|
398
|
+
module.exports.IdentifierGenerator = IdentifierGenerator;
|
|
399
|
+
module.exports.IdentifierGeneratorHandlers = IdentifierGeneratorHandlers;
|
|
400
|
+
}
|
|
401
|
+
if (typeof exports !== 'undefined') {
|
|
402
|
+
exports.IdentifierGenerator = IdentifierGenerator;
|
|
403
|
+
exports.IdentifierGeneratorHandlers = IdentifierGeneratorHandlers;
|
|
404
|
+
}
|
|
405
|
+
return __bundledModules;
|
|
406
|
+
})(typeof global !== 'undefined' ? global :
|
|
407
|
+
typeof window !== 'undefined' ? window :
|
|
408
|
+
typeof self !== 'undefined' ? self :
|
|
409
|
+
typeof globalThis !== 'undefined' ? globalThis :
|
|
410
|
+
{});
|
|
411
|
+
const IdentifierGeneratorElementGF = globalFunct.IdentifierGenerator;
|
|
412
|
+
const IdentifierGeneratorHandlersElementGF = globalFunct.IdentifierGeneratorHandlers;
|
|
413
|
+
export { IdentifierGeneratorElementGF as IdentifierGenerator, IdentifierGeneratorHandlersElementGF as IdentifierGeneratorHandlers, };
|
|
414
|
+
if (typeof module !== 'undefined' && module.exports) {
|
|
415
|
+
module.exports = {
|
|
416
|
+
IdentifierGenerator: IdentifierGeneratorElementGF,
|
|
417
|
+
IdentifierGeneratorHandlers: IdentifierGeneratorHandlersElementGF,
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
if (typeof module !== 'undefined' && module.exports) {
|
|
421
|
+
module.exports.default = globalFunct?.default;
|
|
422
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arc-js/id-generator",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.0.0",
|
|
7
|
+
"description": "ID-GENERATOR est une bibliothèque TypeScript robuste pour générer des identifiants uniques avec des formats personnalisables. Elle offre une syntaxe expressive pour créer des identifiants complexes combinant texte, chaînes aléatoires, UUID et fonctions personnalisées.",
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "INICODE <contact.inicode@gmail.com>",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"init": "npm init --scope=@arc-js/id-generator",
|
|
14
|
+
"login": "npm login"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {},
|
|
17
|
+
"dependencies": {}
|
|
18
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES6",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable", "ESNext"],
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"declaration": false,
|
|
9
|
+
"sourceMap": false,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"noEmit": false,
|
|
12
|
+
|
|
13
|
+
"strict": false,
|
|
14
|
+
"noImplicitAny": false,
|
|
15
|
+
"strictNullChecks": false,
|
|
16
|
+
"strictFunctionTypes": false,
|
|
17
|
+
"strictBindCallApply": false,
|
|
18
|
+
"strictPropertyInitialization": false,
|
|
19
|
+
"noImplicitThis": false,
|
|
20
|
+
"alwaysStrict": false
|
|
21
|
+
},
|
|
22
|
+
"include": [],
|
|
23
|
+
"exclude": [
|
|
24
|
+
"node_modules",
|
|
25
|
+
"**/*.d.ts"
|
|
26
|
+
]
|
|
27
|
+
}
|