@lowentry/utils 1.19.1 → 1.19.3

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.
@@ -29,6 +29,9 @@
29
29
  "extractorMessageReporting": {
30
30
  "default": {
31
31
  "logLevel": "none"
32
+ },
33
+ "ae-wrong-input-file-type": {
34
+ "logLevel": "none"
32
35
  }
33
36
  },
34
37
  "tsdocMessageReporting": {
@@ -2,7 +2,7 @@ export function ISSET(value: any): boolean;
2
2
  export function IS_ARRAY(value: any): boolean;
3
3
  export function ARRAY(value: any): any[];
4
4
  export function IS_OBJECT(value: any): boolean;
5
- export function OBJECT(value: any): object;
5
+ export function OBJECT(value: any): any;
6
6
  export function STRING(value: any): string;
7
7
  export function STRING_ANY(...values: any): string;
8
8
  export function INT(value: any): number;
@@ -15,26 +15,26 @@ export namespace LeUtils {
15
15
  largerThan: ((arg0: string | any) => boolean);
16
16
  largerThanOrEquals: ((arg0: string | any) => boolean);
17
17
  };
18
- export function contains(array: any[] | object | Function, value: any): boolean;
19
- export function containsCaseInsensitive(array: any[] | object | Function, value: any): boolean;
20
- export function containsAll(array: any[] | object | Function, values: any[] | object | Function): boolean;
21
- export function containsAllCaseInsensitive(array: any[] | object | Function, values: any[] | object | Function): boolean;
22
- export function containsAny(array: any[] | object | Function, values: any[] | object | Function): boolean;
23
- export function containsAnyCaseInsensitive(array: any[] | object | Function, values: any[] | object | Function): boolean;
24
- export function containsNone(array: any[] | object | Function, values: any[] | object | Function): boolean;
25
- export function containsNoneCaseInsensitive(array: any[] | object | Function, values: any[] | object | Function): boolean;
26
- export function findIndexValue(elements: any[] | object | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): {
18
+ export function contains(array: any[] | any | Function, value: any): boolean;
19
+ export function containsCaseInsensitive(array: any[] | any | Function, value: any): boolean;
20
+ export function containsAll(array: any[] | any | Function, values: any[] | any | Function): boolean;
21
+ export function containsAllCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
22
+ export function containsAny(array: any[] | any | Function, values: any[] | any | Function): boolean;
23
+ export function containsAnyCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
24
+ export function containsNone(array: any[] | any | Function, values: any[] | any | Function): boolean;
25
+ export function containsNoneCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
26
+ export function findIndexValue(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): {
27
27
  index: any;
28
28
  value: any;
29
29
  } | null;
30
- export function findIndex(elements: any[] | object | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
31
- export function find(elements: any[] | object | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
30
+ export function findIndex(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
31
+ export function find(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
32
32
  export function getValueAtIndex(elements: any, index: any, optionalSkipHasOwnPropertyCheck?: boolean): any;
33
33
  export function supportsEach(elements: any): boolean;
34
34
  export function eachIterator(elements: any, optionalSkipHasOwnPropertyCheck?: boolean): Generator<any, void, unknown>;
35
35
  export function each(elements: any, callback: (value: any, index?: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any;
36
36
  export function eachAsync(elements: any, asyncCallback: any, parallelCount?: number, optionalSkipHasOwnPropertyCheck?: boolean): Promise<any>;
37
- export function getEmptySimplifiedCollection(elements: any): [boolean, any[] | object | Map<any, any>, (value: any, index: any) => void];
37
+ export function getEmptySimplifiedCollection(elements: any): [boolean, any[] | any | Map<any, any>, (value: any, index: any) => void];
38
38
  export function filter(elements: any, callback?: (value: any, index: any) => boolean | undefined, optionalSkipHasOwnPropertyCheck?: boolean): any;
39
39
  export function map(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any;
40
40
  export function mapToArray(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
@@ -47,8 +47,8 @@ export namespace LeUtils {
47
47
  export function compareNumericStrings(a: string | number, b: string | number): number;
48
48
  export function compareNaturalStrings(a: string, b: string): number;
49
49
  export function compareTimestampStrings(a: string, b: string): number;
50
- export function isEmptyObject(obj: object, optionalSkipHasOwnPropertyCheck?: boolean | undefined): boolean;
51
- export function getObjectFieldsCount(obj: object, optionalSkipHasOwnPropertyCheck?: boolean | undefined): number;
50
+ export function isEmptyObject(obj: any, optionalSkipHasOwnPropertyCheck?: boolean | undefined): boolean;
51
+ export function getObjectFieldsCount(obj: any, optionalSkipHasOwnPropertyCheck?: boolean | undefined): number;
52
52
  export function isGeneratorFunction(func: any): any;
53
53
  export function setTimeout(callback: (deltaTime: number) => any, ms: number): {
54
54
  remove: Function;
@@ -67,7 +67,7 @@ export namespace LeUtils {
67
67
  export function fetch(url: string, options?: {
68
68
  retries?: number | null;
69
69
  delay?: number | ((attempt: number) => number) | null;
70
- } | object | null): {
70
+ } | any | null): {
71
71
  then: Function;
72
72
  catch: Function;
73
73
  finally: Function;
@@ -11,7 +11,7 @@ export class SerializableMap extends Map<any, any> {
11
11
  /**
12
12
  * Returns a JSON representation of the map.
13
13
  *
14
- * @returns {object}
14
+ * @returns {Object}
15
15
  */
16
- toJSON(): object;
16
+ toJSON(): any;
17
17
  }
package/index.d.ts CHANGED
@@ -39,26 +39,26 @@ export declare namespace LeUtils {
39
39
  largerThan: ((arg0: string | any) => boolean);
40
40
  largerThanOrEquals: ((arg0: string | any) => boolean);
41
41
  };
42
- export function contains(array: any[] | object | Function, value: any): boolean;
43
- export function containsCaseInsensitive(array: any[] | object | Function, value: any): boolean;
44
- export function containsAll(array: any[] | object | Function, values: any[] | object | Function): boolean;
45
- export function containsAllCaseInsensitive(array: any[] | object | Function, values: any[] | object | Function): boolean;
46
- export function containsAny(array: any[] | object | Function, values: any[] | object | Function): boolean;
47
- export function containsAnyCaseInsensitive(array: any[] | object | Function, values: any[] | object | Function): boolean;
48
- export function containsNone(array: any[] | object | Function, values: any[] | object | Function): boolean;
49
- export function containsNoneCaseInsensitive(array: any[] | object | Function, values: any[] | object | Function): boolean;
50
- export function findIndexValue(elements: any[] | object | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): {
42
+ export function contains(array: any[] | any | Function, value: any): boolean;
43
+ export function containsCaseInsensitive(array: any[] | any | Function, value: any): boolean;
44
+ export function containsAll(array: any[] | any | Function, values: any[] | any | Function): boolean;
45
+ export function containsAllCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
46
+ export function containsAny(array: any[] | any | Function, values: any[] | any | Function): boolean;
47
+ export function containsAnyCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
48
+ export function containsNone(array: any[] | any | Function, values: any[] | any | Function): boolean;
49
+ export function containsNoneCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
50
+ export function findIndexValue(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): {
51
51
  index: any;
52
52
  value: any;
53
53
  } | null;
54
- export function findIndex(elements: any[] | object | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
55
- export function find(elements: any[] | object | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
54
+ export function findIndex(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
55
+ export function find(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
56
56
  export function getValueAtIndex(elements: any, index: any, optionalSkipHasOwnPropertyCheck?: boolean): any;
57
57
  export function supportsEach(elements: any): boolean;
58
58
  export function eachIterator(elements: any, optionalSkipHasOwnPropertyCheck?: boolean): Generator<any, void, unknown>;
59
59
  export function each(elements: any, callback: (value: any, index?: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any;
60
60
  export function eachAsync(elements: any, asyncCallback: any, parallelCount?: number, optionalSkipHasOwnPropertyCheck?: boolean): Promise<any>;
61
- export function getEmptySimplifiedCollection(elements: any): [boolean, any[] | object | Map<any, any>, (value: any, index: any) => void];
61
+ export function getEmptySimplifiedCollection(elements: any): [boolean, any[] | any | Map<any, any>, (value: any, index: any) => void];
62
62
  export function filter(elements: any, callback?: (value: any, index: any) => boolean | undefined, optionalSkipHasOwnPropertyCheck?: boolean): any;
63
63
  export function map(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any;
64
64
  export function mapToArray(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
@@ -71,8 +71,8 @@ export declare namespace LeUtils {
71
71
  export function compareNumericStrings(a: string | number, b: string | number): number;
72
72
  export function compareNaturalStrings(a: string, b: string): number;
73
73
  export function compareTimestampStrings(a: string, b: string): number;
74
- export function isEmptyObject(obj: object, optionalSkipHasOwnPropertyCheck?: boolean | undefined): boolean;
75
- export function getObjectFieldsCount(obj: object, optionalSkipHasOwnPropertyCheck?: boolean | undefined): number;
74
+ export function isEmptyObject(obj: any, optionalSkipHasOwnPropertyCheck?: boolean | undefined): boolean;
75
+ export function getObjectFieldsCount(obj: any, optionalSkipHasOwnPropertyCheck?: boolean | undefined): number;
76
76
  export function isGeneratorFunction(func: any): any;
77
77
  export function setTimeout(callback: (deltaTime: number) => any, ms: number): {
78
78
  remove: Function;
@@ -91,7 +91,7 @@ export declare namespace LeUtils {
91
91
  export function fetch(url: string, options?: {
92
92
  retries?: number | null;
93
93
  delay?: number | ((attempt: number) => number) | null;
94
- } | object | null): {
94
+ } | any | null): {
95
95
  then: Function;
96
96
  catch: Function;
97
97
  finally: Function;
@@ -274,7 +274,7 @@ export declare class LinkedList {
274
274
  #private;
275
275
  }
276
276
 
277
- export declare function OBJECT(value: any): object;
277
+ export declare function OBJECT(value: any): any;
278
278
 
279
279
  /**
280
280
  * SerializableMap class extends the native Map to provide a JSON representation.
@@ -289,9 +289,9 @@ export declare class SerializableMap extends Map<any, any> {
289
289
  /**
290
290
  * Returns a JSON representation of the map.
291
291
  *
292
- * @returns {object}
292
+ * @returns {Object}
293
293
  */
294
- toJSON(): object;
294
+ toJSON(): any;
295
295
  }
296
296
 
297
297
  export declare function STRING(value: any): string;
package/index.js CHANGED
@@ -61,7 +61,7 @@ var IS_OBJECT = function IS_OBJECT(value) {
61
61
  * Ensures the given value is an object (returns an empty object if it's not).
62
62
  *
63
63
  * @param value
64
- * @returns {object}
64
+ * @returns {Object}
65
65
  */
66
66
  var OBJECT = function OBJECT(value) {
67
67
  return IS_OBJECT(value) ? value : {};
@@ -383,7 +383,7 @@ var LeUtils = {
383
383
  *
384
384
  * Values are compared by casting both of them to a string.
385
385
  *
386
- * @param {array|object|Function} array
386
+ * @param {*[]|Object|Function} array
387
387
  * @param {*} value
388
388
  * @returns {boolean}
389
389
  */
@@ -406,7 +406,7 @@ var LeUtils = {
406
406
  *
407
407
  * Values are compared by casting both of them to a string, and then lowercasing them.
408
408
  *
409
- * @param {array|object|Function} array
409
+ * @param {*[]|Object|Function} array
410
410
  * @param {*} value
411
411
  * @returns {boolean}
412
412
  */
@@ -429,8 +429,8 @@ var LeUtils = {
429
429
  *
430
430
  * Values are compared by casting both of them to a string.
431
431
  *
432
- * @param {array|object|Function} array
433
- * @param {array|object|Function} values
432
+ * @param {*[]|Object|Function} array
433
+ * @param {*[]|Object|Function} values
434
434
  * @returns {boolean}
435
435
  */
436
436
  containsAll: function containsAll(array, values) {
@@ -451,8 +451,8 @@ var LeUtils = {
451
451
  *
452
452
  * Values are compared by casting both of them to a string, and then lowercasing them.
453
453
  *
454
- * @param {array|object|Function} array
455
- * @param {array|object|Function} values
454
+ * @param {*[]|Object|Function} array
455
+ * @param {*[]|Object|Function} values
456
456
  * @returns {boolean}
457
457
  */
458
458
  containsAllCaseInsensitive: function containsAllCaseInsensitive(array, values) {
@@ -473,8 +473,8 @@ var LeUtils = {
473
473
  *
474
474
  * Values are compared by casting both of them to a string.
475
475
  *
476
- * @param {array|object|Function} array
477
- * @param {array|object|Function} values
476
+ * @param {*[]|Object|Function} array
477
+ * @param {*[]|Object|Function} values
478
478
  * @returns {boolean}
479
479
  */
480
480
  containsAny: function containsAny(array, values) {
@@ -495,8 +495,8 @@ var LeUtils = {
495
495
  *
496
496
  * Values are compared by casting both of them to a string, and then lowercasing them.
497
497
  *
498
- * @param {array|object|Function} array
499
- * @param {array|object|Function} values
498
+ * @param {*[]|Object|Function} array
499
+ * @param {*[]|Object|Function} values
500
500
  * @returns {boolean}
501
501
  */
502
502
  containsAnyCaseInsensitive: function containsAnyCaseInsensitive(array, values) {
@@ -517,8 +517,8 @@ var LeUtils = {
517
517
  *
518
518
  * Values are compared by casting both of them to a string.
519
519
  *
520
- * @param {array|object|Function} array
521
- * @param {array|object|Function} values
520
+ * @param {*[]|Object|Function} array
521
+ * @param {*[]|Object|Function} values
522
522
  * @returns {boolean}
523
523
  */
524
524
  containsNone: function containsNone(array, values) {
@@ -539,8 +539,8 @@ var LeUtils = {
539
539
  *
540
540
  * Values are compared by casting both of them to a string, and then lowercasing them.
541
541
  *
542
- * @param {array|object|Function} array
543
- * @param {array|object|Function} values
542
+ * @param {*[]|Object|Function} array
543
+ * @param {*[]|Object|Function} values
544
544
  * @returns {boolean}
545
545
  */
546
546
  containsNoneCaseInsensitive: function containsNoneCaseInsensitive(array, values) {
@@ -559,7 +559,7 @@ var LeUtils = {
559
559
  /**
560
560
  * Finds the first element in the given array or object that returns true from the callback, and returns an object with the index and value.
561
561
  *
562
- * @param {*[]|object|Function} elements
562
+ * @param {*[]|Object|Function} elements
563
563
  * @param {(value:*, index:*) => boolean|void} callback
564
564
  * @param {boolean} [optionalSkipHasOwnPropertyCheck]
565
565
  * @returns {{index:*, value:*}|null}
@@ -581,7 +581,7 @@ var LeUtils = {
581
581
  /**
582
582
  * Finds the first element in the given array or object that returns true from the callback, and returns the index.
583
583
  *
584
- * @param {*[]|object|Function} elements
584
+ * @param {*[]|Object|Function} elements
585
585
  * @param {(value:*, index:*) => boolean|void} callback
586
586
  * @param {boolean} [optionalSkipHasOwnPropertyCheck]
587
587
  * @returns {*|null}
@@ -594,7 +594,7 @@ var LeUtils = {
594
594
  /**
595
595
  * Finds the first element in the given array or object that returns true from the callback, and returns the value.
596
596
  *
597
- * @param {*[]|object|Function} elements
597
+ * @param {*[]|Object|Function} elements
598
598
  * @param {(value:*, index:*) => boolean|void} callback
599
599
  * @param {boolean} [optionalSkipHasOwnPropertyCheck]
600
600
  * @returns {*|null}
@@ -1140,7 +1140,7 @@ var LeUtils = {
1140
1140
  * ```
1141
1141
  *
1142
1142
  * @param {*} elements
1143
- * @returns {[boolean, *[]|object|Map, (value:*,index:*)=>void]}
1143
+ * @returns {[boolean, *[]|Object|Map, (value:*,index:*)=>void]}
1144
1144
  */
1145
1145
  getEmptySimplifiedCollection: function getEmptySimplifiedCollection(elements) {
1146
1146
  if (elements === null || typeof elements === 'undefined') {
@@ -1461,7 +1461,7 @@ var LeUtils = {
1461
1461
  /**
1462
1462
  * Returns true if the given object is empty, false otherwise.
1463
1463
  *
1464
- * @param {object} obj
1464
+ * @param {Object} obj
1465
1465
  * @param [optionalSkipHasOwnPropertyCheck]
1466
1466
  * @returns {boolean}
1467
1467
  */
@@ -1477,7 +1477,7 @@ var LeUtils = {
1477
1477
  /**
1478
1478
  * Returns the number of fields in the given object.
1479
1479
  *
1480
- * @param {object} obj
1480
+ * @param {Object} obj
1481
1481
  * @param [optionalSkipHasOwnPropertyCheck]
1482
1482
  * @returns {number}
1483
1483
  */
@@ -1772,7 +1772,7 @@ var LeUtils = {
1772
1772
  * Allows you to do a fetch, with built-in retry and abort functionality.
1773
1773
  *
1774
1774
  * @param {string} url
1775
- * @param {{retries?:number|null, delay?:number|((attempt:number)=>number)|null}|object|null} [options]
1775
+ * @param {{retries?:number|null, delay?:number|((attempt:number)=>number)|null}|Object|null} [options]
1776
1776
  * @returns {{then:Function, catch:Function, finally:Function, remove:Function, isRemoved:Function}}
1777
1777
  */
1778
1778
  fetch: function (_fetch) {
@@ -3677,7 +3677,7 @@ var SerializableMap = /*#__PURE__*/function (_Map) {
3677
3677
  /**
3678
3678
  * Returns a JSON representation of the map.
3679
3679
  *
3680
- * @returns {object}
3680
+ * @returns {Object}
3681
3681
  */
3682
3682
  function toJSON() {
3683
3683
  return Object.fromEntries(this);