topkat-utils 1.0.43 → 1.0.46

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### v1.0.46
2
+ * FIX templater undefined no error anymore
3
+
1
4
  ### v1.0.42
2
5
  * type for date function
3
6
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "topkat-utils",
3
- "version": "1.0.43",
4
- "type": "module",
3
+ "version": "1.0.46",
4
+ "type": "commonjs",
5
5
  "private": false,
6
6
  "description": "UTILS BIG TIME",
7
7
  "author": "538ROMEO",
package/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "es2020",
3
+ "module": "CommonJS",
4
4
  "allowSyntheticDefaultImports": true,
5
5
  "target": "ES2018",
6
6
  "noImplicitAny": false,
package/utils.d.ts CHANGED
@@ -8,7 +8,7 @@ declare type Color = [number, number, number];
8
8
  declare type ObjectGeneric = {
9
9
  [k: string]: any;
10
10
  };
11
- declare type BaseTypes = 'objectId' | 'dateInt6' | 'dateInt' | 'dateInt8' | 'dateInt12' | 'time' | 'humanReadableTimestamp' | 'date' | 'dateObject' | 'array' | 'object' | 'buffer' | 'string' | 'function' | 'boolean' | 'number' | 'bigint' | 'year' | 'email';
11
+ declare type BaseTypes = 'objectId' | 'dateInt6' | 'dateInt' | 'dateInt8' | 'dateInt12' | 'time' | 'humanReadableTimestamp' | 'date' | 'dateObject' | 'array' | 'object' | 'buffer' | 'string' | 'function' | 'boolean' | 'number' | 'bigint' | 'year' | 'email' | 'any';
12
12
  /** Round with custom number of decimals (default:0) */
13
13
  declare function round(number: number, decimals?: number): number;
14
14
  /** Round with custom number of decimals (default:0) */
@@ -311,7 +311,7 @@ declare function getId(obj?: any): string;
311
311
  /**
312
312
  * @returns {array} return values of all callbacks
313
313
  */
314
- declare function forI(nbIterations: number, callback: (number: any) => void | any): any[];
314
+ declare function forI(nbIterations: number, callback: (number: number, previousValue: any, arrayOfPreviousValues: any[]) => void | any): any[];
315
315
  declare function forIasync(nbIterations: number, callback: (number: any) => void | any): Promise<any[]>;
316
316
  declare function cleanStackTrace(stack: any): string;
317
317
  declare function isset(...elms: any[]): boolean;
@@ -437,6 +437,7 @@ declare type ValidatorObject = {
437
437
  regexp?: RegExp;
438
438
  mustNotBeSet?: boolean;
439
439
  optional?: boolean;
440
+ isArray?: boolean;
440
441
  [k: string]: any;
441
442
  };
442
443
  declare function validator(...paramsToValidate: ValidatorObject[]): void;