@lowentry/utils 1.19.2 → 1.19.4

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.
@@ -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;
@@ -1,10 +1,10 @@
1
1
  export namespace LeUtils {
2
- export { FastDeepEqual as equals };
3
- export function clone(value: any): any;
4
- export function onDomReady(callback: Function): {
2
+ function equals(value: any, other: any): boolean;
3
+ function clone(value: any): any;
4
+ function onDomReady(callback: Function): {
5
5
  remove: Function;
6
6
  };
7
- export function parseVersionString(versionString: string | any): {
7
+ function parseVersionString(versionString: string | any): {
8
8
  major: (number);
9
9
  minor: (number);
10
10
  patch: (number);
@@ -15,110 +15,110 @@ 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
+ function contains(array: any[] | any | Function, value: any): boolean;
19
+ function containsCaseInsensitive(array: any[] | any | Function, value: any): boolean;
20
+ function containsAll(array: any[] | any | Function, values: any[] | any | Function): boolean;
21
+ function containsAllCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
22
+ function containsAny(array: any[] | any | Function, values: any[] | any | Function): boolean;
23
+ function containsAnyCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
24
+ function containsNone(array: any[] | any | Function, values: any[] | any | Function): boolean;
25
+ function containsNoneCaseInsensitive(array: any[] | any | Function, values: any[] | any | Function): boolean;
26
+ 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;
32
- export function getValueAtIndex(elements: any, index: any, optionalSkipHasOwnPropertyCheck?: boolean): any;
33
- export function supportsEach(elements: any): boolean;
34
- export function eachIterator(elements: any, optionalSkipHasOwnPropertyCheck?: boolean): Generator<any, void, unknown>;
35
- export function each(elements: any, callback: (value: any, index?: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any;
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];
38
- export function filter(elements: any, callback?: (value: any, index: any) => boolean | undefined, optionalSkipHasOwnPropertyCheck?: boolean): any;
39
- export function map(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any;
40
- export function mapToArray(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
41
- export function mapToArraySorted(elements: any, comparator: (valueA: any, valueB: any) => number, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
42
- export function sortKeys(elements: any, comparator: (valueA: any, valueB: any) => number, optionalSkipHasOwnPropertyCheck?: boolean): any[];
43
- export function flattenArray(array: any): any[];
44
- export function flattenToArray(elements: any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
45
- export function compare(a: any, b: any): number;
46
- export function compareNumbers(a: number, b: number): number;
47
- export function compareNumericStrings(a: string | number, b: string | number): number;
48
- export function compareNaturalStrings(a: string, b: string): number;
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;
52
- export function isGeneratorFunction(func: any): any;
53
- export function setTimeout(callback: (deltaTime: number) => any, ms: number): {
30
+ function findIndex(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
31
+ function find(elements: any[] | any | Function, callback: (value: any, index: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any | null;
32
+ function getValueAtIndex(elements: any, index: any, optionalSkipHasOwnPropertyCheck?: boolean): any;
33
+ function supportsEach(elements: any): boolean;
34
+ function eachIterator(elements: any, optionalSkipHasOwnPropertyCheck?: boolean): Generator<any, void, unknown>;
35
+ function each(elements: any, callback: (value: any, index?: any) => boolean | void, optionalSkipHasOwnPropertyCheck?: boolean): any;
36
+ function eachAsync(elements: any, asyncCallback: any, parallelCount?: number, optionalSkipHasOwnPropertyCheck?: boolean): Promise<any>;
37
+ function getEmptySimplifiedCollection(elements: any): [boolean, any[] | any | Map<any, any>, (value: any, index: any) => void];
38
+ function filter(elements: any, callback?: (value: any, index: any) => boolean | undefined, optionalSkipHasOwnPropertyCheck?: boolean): any;
39
+ function map(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any;
40
+ function mapToArray(elements: any, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
41
+ function mapToArraySorted(elements: any, comparator: (valueA: any, valueB: any) => number, callback?: (value: any, index: any) => any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
42
+ function sortKeys(elements: any, comparator: (valueA: any, valueB: any) => number, optionalSkipHasOwnPropertyCheck?: boolean): any[];
43
+ function flattenArray(array: any): any[];
44
+ function flattenToArray(elements: any, optionalSkipHasOwnPropertyCheck?: boolean): any[];
45
+ function compare(a: any, b: any): number;
46
+ function compareNumbers(a: number, b: number): number;
47
+ function compareNumericStrings(a: string | number, b: string | number): number;
48
+ function compareNaturalStrings(a: string, b: string): number;
49
+ function compareTimestampStrings(a: string, b: string): number;
50
+ function isEmptyObject(obj: any, optionalSkipHasOwnPropertyCheck?: boolean | undefined): boolean;
51
+ function getObjectFieldsCount(obj: any, optionalSkipHasOwnPropertyCheck?: boolean | undefined): number;
52
+ function isGeneratorFunction(func: any): any;
53
+ function setTimeout(callback: (deltaTime: number) => any, ms: number): {
54
54
  remove: Function;
55
55
  };
56
- export function setInterval(callback: (deltaTime: number) => any, intervalMs?: number, fireImmediately?: boolean): {
56
+ function setInterval(callback: (deltaTime: number) => any, intervalMs?: number, fireImmediately?: boolean): {
57
57
  remove: Function;
58
58
  };
59
- export function setAnimationFrameTimeout(callback: (deltaTime: number) => any, frames?: number): {
59
+ function setAnimationFrameTimeout(callback: (deltaTime: number) => any, frames?: number): {
60
60
  remove: Function;
61
61
  };
62
- export function setAnimationFrameInterval(callback: (deltaTime: number) => any, intervalFrames?: number, fireImmediately?: boolean): {
62
+ function setAnimationFrameInterval(callback: (deltaTime: number) => any, intervalFrames?: number, fireImmediately?: boolean): {
63
63
  remove: Function;
64
64
  };
65
- export function promiseTimeout(ms: number): Promise<number>;
66
- export function promiseAnimationFrameTimeout(frames: number): Promise<number>;
67
- export function fetch(url: string, options?: {
65
+ function promiseTimeout(ms: number): Promise<number>;
66
+ function promiseAnimationFrameTimeout(frames: number): Promise<number>;
67
+ 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;
74
74
  remove: Function;
75
75
  isRemoved: Function;
76
76
  };
77
- export function cachedFetch(url: any, options: any, responseFunction: any): Promise<any>;
78
- export function platformIsMobile(): boolean;
79
- export function platformHasCursor(): boolean;
80
- export function capitalize(string: string): string;
81
- export function endsWithAny(string: string, endingCharsStringOrArray: string | string[]): boolean;
82
- export function startsWithAny(string: string, startingCharsStringOrArray: string | string[]): boolean;
83
- export function trimEnd(string: string, trimCharsStringOrArray: string | string[]): string;
84
- export function trimStart(string: string, trimCharsStringOrArray: string | string[]): string;
85
- export function trim(string: string, trimCharsStringOrArray: string | string[]): string;
86
- export function purgeSentence(sentence: string): string;
87
- export function purgeErrorMessage(error: any): string;
88
- export function generateNamePermutations(...names: string[]): string[];
89
- export function increaseNumericStringByOne(string: string): string;
90
- export function uniqueId(): string;
91
- export function timestamp(now?: number | null | undefined): string;
92
- export function getEmptyImageSrc(): string;
93
- export function getPercentage(part: number | string, total: number | string): number;
94
- export function getImagePixels(image: HTMLImageElement): Uint8ClampedArray;
95
- export function getColoredImage(image: HTMLImageElement, color: string): string;
96
- export function rgbToHex(rgb: number[]): string;
97
- export function hexToRgb(hexstring: string): number[];
98
- export function rgbToHsl(rgb: number[]): number[];
99
- export function hslToRgb(hsl: any): number[];
100
- export function rgbToLab(rgb: number[]): number[];
101
- export function getDifferenceBetweenRgb(rgbA: number[], rgbB: number[]): number;
102
- export function getDifferenceBetweenLab(labA: number[], labB: number[]): number;
103
- export function getRgbOfGradient(gradient: {
77
+ function cachedFetch(url: any, options: any, responseFunction: any): Promise<any>;
78
+ function platformIsMobile(): boolean;
79
+ function platformHasCursor(): boolean;
80
+ function capitalize(string: string): string;
81
+ function endsWithAny(string: string, endingCharsStringOrArray: string | string[]): boolean;
82
+ function startsWithAny(string: string, startingCharsStringOrArray: string | string[]): boolean;
83
+ function trimEnd(string: string, trimCharsStringOrArray: string | string[]): string;
84
+ function trimStart(string: string, trimCharsStringOrArray: string | string[]): string;
85
+ function trim(string: string, trimCharsStringOrArray: string | string[]): string;
86
+ function purgeSentence(sentence: string): string;
87
+ function purgeErrorMessage(error: any): string;
88
+ function generateNamePermutations(...names: string[]): string[];
89
+ function increaseNumericStringByOne(string: string): string;
90
+ function uniqueId(): string;
91
+ function timestamp(now?: number | null | undefined): string;
92
+ function getEmptyImageSrc(): string;
93
+ function getPercentage(part: number | string, total: number | string): number;
94
+ function getImagePixels(image: HTMLImageElement): Uint8ClampedArray;
95
+ function getColoredImage(image: HTMLImageElement, color: string): string;
96
+ function rgbToHex(rgb: number[]): string;
97
+ function hexToRgb(hexstring: string): number[];
98
+ function rgbToHsl(rgb: number[]): number[];
99
+ function hslToRgb(hsl: any): number[];
100
+ function rgbToLab(rgb: number[]): number[];
101
+ function getDifferenceBetweenRgb(rgbA: number[], rgbB: number[]): number;
102
+ function getDifferenceBetweenLab(labA: number[], labB: number[]): number;
103
+ function getRgbOfGradient(gradient: {
104
104
  percentage?: number[];
105
105
  }, percentage: number): number[];
106
- export function getRgbBetween(startRgb: number[], endRgb: number[], percentage: number): number[];
107
- export function btoa(string: string): string;
108
- export function atob(base64string: string): string;
109
- export function utf8ToBase64(string: string): string;
110
- export function base64ToUtf8(base64string: string): string;
111
- export function base64ToHex(base64string: string): string;
112
- export function hexToBase64(hexstring: string): string;
113
- export function base64ToBytes(base64string: string): Uint8Array;
114
- export function bytesToBase64(arraybuffer: ArrayLike<number> | ArrayBuffer): string;
115
- export function downloadFile(base64string: string, fileName?: string, mimeType?: string): void;
116
- export function localStorageGet(id: string): any;
117
- export function localStorageSet(id: string, data: any): void;
118
- export function localStorageRemove(id: string): void;
119
- export function isCurrentHostPrivate(): boolean;
120
- export function isGivenHostPrivate(host: string): boolean;
121
- export function createTreeSet(elements: any[], comparator: (valueA: any, valueB: any) => number): {
106
+ function getRgbBetween(startRgb: number[], endRgb: number[], percentage: number): number[];
107
+ function btoa(string: string): string;
108
+ function atob(base64string: string): string;
109
+ function utf8ToBase64(string: string): string;
110
+ function base64ToUtf8(base64string: string): string;
111
+ function base64ToHex(base64string: string): string;
112
+ function hexToBase64(hexstring: string): string;
113
+ function base64ToBytes(base64string: string): Uint8Array;
114
+ function bytesToBase64(arraybuffer: ArrayLike<number> | ArrayBuffer): string;
115
+ function downloadFile(base64string: string, fileName?: string, mimeType?: string): void;
116
+ function localStorageGet(id: string): any;
117
+ function localStorageSet(id: string, data: any): void;
118
+ function localStorageRemove(id: string): void;
119
+ function isCurrentHostPrivate(): boolean;
120
+ function isGivenHostPrivate(host: string): boolean;
121
+ function createTreeSet(elements: any[], comparator: (valueA: any, valueB: any) => number): {
122
122
  getElements: (() => any[]);
123
123
  getComparator: (() => ((valueA: any, valueB: any) => number));
124
124
  size: (() => number);
@@ -133,86 +133,85 @@ export namespace LeUtils {
133
133
  getEqualValue: ((value: any) => any);
134
134
  getEqualValueOrAdd: ((value: any) => any);
135
135
  };
136
- export function createTransactionalValue(value?: any): {
136
+ function createTransactionalValue(value?: any): {
137
137
  value: any;
138
138
  changes: {
139
139
  id: string;
140
140
  value: any;
141
141
  }[];
142
142
  };
143
- export function isTransactionalValueValid(transactionalValue: {
143
+ function isTransactionalValueValid(transactionalValue: {
144
144
  value: any;
145
145
  changes: {
146
146
  id: string;
147
147
  value: any;
148
148
  }[];
149
149
  }): boolean;
150
- export function transactionalValueToString(transactionalValue: {
150
+ function transactionalValueToString(transactionalValue: {
151
151
  value: any;
152
152
  changes: {
153
153
  id: string;
154
154
  value: any;
155
155
  }[];
156
156
  }): string;
157
- export function transactionSetAndCommit(transactionalValue: {
157
+ function transactionSetAndCommit(transactionalValue: {
158
158
  value: any;
159
159
  changes: {
160
160
  id: string;
161
161
  value: any;
162
162
  }[];
163
163
  }, value: any): void;
164
- export function transactionSetWithoutCommitting(transactionalValue: {
164
+ function transactionSetWithoutCommitting(transactionalValue: {
165
165
  value: any;
166
166
  changes: {
167
167
  id: string;
168
168
  value: any;
169
169
  }[];
170
170
  }, value: any): string;
171
- export function transactionCommitChange(transactionalValue: {
171
+ function transactionCommitChange(transactionalValue: {
172
172
  value: any;
173
173
  changes: {
174
174
  id: string;
175
175
  value: any;
176
176
  }[];
177
177
  }, changeId: string): boolean;
178
- export function transactionCancelChange(transactionalValue: {
178
+ function transactionCancelChange(transactionalValue: {
179
179
  value: any;
180
180
  changes: {
181
181
  id: string;
182
182
  value: any;
183
183
  }[];
184
184
  }, changeId: string): boolean;
185
- export function transactionIsChangeRelevant(transactionalValue: {
185
+ function transactionIsChangeRelevant(transactionalValue: {
186
186
  value: any;
187
187
  changes: {
188
188
  id: string;
189
189
  value: any;
190
190
  }[];
191
191
  }, changeId: string): boolean;
192
- export function transactionGetCommittedValue(transactionalValue: {
192
+ function transactionGetCommittedValue(transactionalValue: {
193
193
  value: any;
194
194
  changes: {
195
195
  id: string;
196
196
  value: any;
197
197
  }[];
198
198
  }): any;
199
- export function transactionGetValue(transactionalValue: {
199
+ function transactionGetValue(transactionalValue: {
200
200
  value: any;
201
201
  changes: {
202
202
  id: string;
203
203
  value: any;
204
204
  }[];
205
205
  }): any;
206
- export function createWorkerThread(name: string): {
206
+ function createWorkerThread(name: string): {
207
207
  worker: Worker | null;
208
208
  sendMessage: (data: any, options: {
209
209
  timeout: number | undefined;
210
210
  } | undefined) => Promise<any>;
211
211
  };
212
- export function sendWorkerMessage(workerName: any, data: any, options: any): any;
213
- export function purgeEmail(email: string): string;
214
- export function isFocusClear(): boolean;
215
- export function getUserLocale(): any;
216
- export function getUserLocaleDateFormat(): any;
212
+ function sendWorkerMessage(workerName: any, data: any, options: any): any;
213
+ function purgeEmail(email: string): string;
214
+ function isFocusClear(): boolean;
215
+ function getUserLocale(): any;
216
+ function getUserLocaleDateFormat(): any;
217
217
  }
218
- import FastDeepEqual from 'fast-deep-equal';
@@ -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
@@ -23,7 +23,7 @@ export declare function IS_OBJECT(value: any): boolean;
23
23
  export declare function ISSET(value: any): boolean;
24
24
 
25
25
  export declare namespace LeUtils {
26
- { FastDeepEqual as equals };
26
+ export function equals(value: any, other: any): boolean;
27
27
  export function clone(value: any): any;
28
28
  export function onDomReady(callback: Function): {
29
29
  remove: Function;
@@ -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 : {};
@@ -254,7 +254,9 @@ var LeUtils = {
254
254
  * @param {*} other The other value to compare.
255
255
  * @returns {boolean} Returns true if the values are equivalent.
256
256
  */
257
- equals: FastDeepEqual,
257
+ equals: function equals(value, other) {
258
+ return FastDeepEqual(value, other);
259
+ },
258
260
  /**
259
261
  * Returns a deep copy of the given value.
260
262
  *
@@ -383,7 +385,7 @@ var LeUtils = {
383
385
  *
384
386
  * Values are compared by casting both of them to a string.
385
387
  *
386
- * @param {array|object|Function} array
388
+ * @param {*[]|Object|Function} array
387
389
  * @param {*} value
388
390
  * @returns {boolean}
389
391
  */
@@ -406,7 +408,7 @@ var LeUtils = {
406
408
  *
407
409
  * Values are compared by casting both of them to a string, and then lowercasing them.
408
410
  *
409
- * @param {array|object|Function} array
411
+ * @param {*[]|Object|Function} array
410
412
  * @param {*} value
411
413
  * @returns {boolean}
412
414
  */
@@ -429,8 +431,8 @@ var LeUtils = {
429
431
  *
430
432
  * Values are compared by casting both of them to a string.
431
433
  *
432
- * @param {array|object|Function} array
433
- * @param {array|object|Function} values
434
+ * @param {*[]|Object|Function} array
435
+ * @param {*[]|Object|Function} values
434
436
  * @returns {boolean}
435
437
  */
436
438
  containsAll: function containsAll(array, values) {
@@ -451,8 +453,8 @@ var LeUtils = {
451
453
  *
452
454
  * Values are compared by casting both of them to a string, and then lowercasing them.
453
455
  *
454
- * @param {array|object|Function} array
455
- * @param {array|object|Function} values
456
+ * @param {*[]|Object|Function} array
457
+ * @param {*[]|Object|Function} values
456
458
  * @returns {boolean}
457
459
  */
458
460
  containsAllCaseInsensitive: function containsAllCaseInsensitive(array, values) {
@@ -473,8 +475,8 @@ var LeUtils = {
473
475
  *
474
476
  * Values are compared by casting both of them to a string.
475
477
  *
476
- * @param {array|object|Function} array
477
- * @param {array|object|Function} values
478
+ * @param {*[]|Object|Function} array
479
+ * @param {*[]|Object|Function} values
478
480
  * @returns {boolean}
479
481
  */
480
482
  containsAny: function containsAny(array, values) {
@@ -495,8 +497,8 @@ var LeUtils = {
495
497
  *
496
498
  * Values are compared by casting both of them to a string, and then lowercasing them.
497
499
  *
498
- * @param {array|object|Function} array
499
- * @param {array|object|Function} values
500
+ * @param {*[]|Object|Function} array
501
+ * @param {*[]|Object|Function} values
500
502
  * @returns {boolean}
501
503
  */
502
504
  containsAnyCaseInsensitive: function containsAnyCaseInsensitive(array, values) {
@@ -517,8 +519,8 @@ var LeUtils = {
517
519
  *
518
520
  * Values are compared by casting both of them to a string.
519
521
  *
520
- * @param {array|object|Function} array
521
- * @param {array|object|Function} values
522
+ * @param {*[]|Object|Function} array
523
+ * @param {*[]|Object|Function} values
522
524
  * @returns {boolean}
523
525
  */
524
526
  containsNone: function containsNone(array, values) {
@@ -539,8 +541,8 @@ var LeUtils = {
539
541
  *
540
542
  * Values are compared by casting both of them to a string, and then lowercasing them.
541
543
  *
542
- * @param {array|object|Function} array
543
- * @param {array|object|Function} values
544
+ * @param {*[]|Object|Function} array
545
+ * @param {*[]|Object|Function} values
544
546
  * @returns {boolean}
545
547
  */
546
548
  containsNoneCaseInsensitive: function containsNoneCaseInsensitive(array, values) {
@@ -559,7 +561,7 @@ var LeUtils = {
559
561
  /**
560
562
  * 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
563
  *
562
- * @param {*[]|object|Function} elements
564
+ * @param {*[]|Object|Function} elements
563
565
  * @param {(value:*, index:*) => boolean|void} callback
564
566
  * @param {boolean} [optionalSkipHasOwnPropertyCheck]
565
567
  * @returns {{index:*, value:*}|null}
@@ -581,7 +583,7 @@ var LeUtils = {
581
583
  /**
582
584
  * Finds the first element in the given array or object that returns true from the callback, and returns the index.
583
585
  *
584
- * @param {*[]|object|Function} elements
586
+ * @param {*[]|Object|Function} elements
585
587
  * @param {(value:*, index:*) => boolean|void} callback
586
588
  * @param {boolean} [optionalSkipHasOwnPropertyCheck]
587
589
  * @returns {*|null}
@@ -594,7 +596,7 @@ var LeUtils = {
594
596
  /**
595
597
  * Finds the first element in the given array or object that returns true from the callback, and returns the value.
596
598
  *
597
- * @param {*[]|object|Function} elements
599
+ * @param {*[]|Object|Function} elements
598
600
  * @param {(value:*, index:*) => boolean|void} callback
599
601
  * @param {boolean} [optionalSkipHasOwnPropertyCheck]
600
602
  * @returns {*|null}
@@ -1140,7 +1142,7 @@ var LeUtils = {
1140
1142
  * ```
1141
1143
  *
1142
1144
  * @param {*} elements
1143
- * @returns {[boolean, *[]|object|Map, (value:*,index:*)=>void]}
1145
+ * @returns {[boolean, *[]|Object|Map, (value:*,index:*)=>void]}
1144
1146
  */
1145
1147
  getEmptySimplifiedCollection: function getEmptySimplifiedCollection(elements) {
1146
1148
  if (elements === null || typeof elements === 'undefined') {
@@ -1461,7 +1463,7 @@ var LeUtils = {
1461
1463
  /**
1462
1464
  * Returns true if the given object is empty, false otherwise.
1463
1465
  *
1464
- * @param {object} obj
1466
+ * @param {Object} obj
1465
1467
  * @param [optionalSkipHasOwnPropertyCheck]
1466
1468
  * @returns {boolean}
1467
1469
  */
@@ -1477,7 +1479,7 @@ var LeUtils = {
1477
1479
  /**
1478
1480
  * Returns the number of fields in the given object.
1479
1481
  *
1480
- * @param {object} obj
1482
+ * @param {Object} obj
1481
1483
  * @param [optionalSkipHasOwnPropertyCheck]
1482
1484
  * @returns {number}
1483
1485
  */
@@ -1772,7 +1774,7 @@ var LeUtils = {
1772
1774
  * Allows you to do a fetch, with built-in retry and abort functionality.
1773
1775
  *
1774
1776
  * @param {string} url
1775
- * @param {{retries?:number|null, delay?:number|((attempt:number)=>number)|null}|object|null} [options]
1777
+ * @param {{retries?:number|null, delay?:number|((attempt:number)=>number)|null}|Object|null} [options]
1776
1778
  * @returns {{then:Function, catch:Function, finally:Function, remove:Function, isRemoved:Function}}
1777
1779
  */
1778
1780
  fetch: function (_fetch) {
@@ -3677,7 +3679,7 @@ var SerializableMap = /*#__PURE__*/function (_Map) {
3677
3679
  /**
3678
3680
  * Returns a JSON representation of the map.
3679
3681
  *
3680
- * @returns {object}
3682
+ * @returns {Object}
3681
3683
  */
3682
3684
  function toJSON() {
3683
3685
  return Object.fromEntries(this);