zek 19.0.13 → 19.0.14
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/fesm2022/zek.mjs +22 -0
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/utils/array-helper.d.ts +6 -0
- package/package.json +1 -1
|
@@ -18,6 +18,12 @@ export declare class ArrayHelper {
|
|
|
18
18
|
static contains(value: any[], v: any): boolean;
|
|
19
19
|
static isArray(value: any): boolean;
|
|
20
20
|
static distinct(array: any[]): any[];
|
|
21
|
+
/**
|
|
22
|
+
* Returns a new array with duplicates removed based on a specific key or selector.
|
|
23
|
+
* @param array The source array.
|
|
24
|
+
* @param keySelector A function that returns the value to compare by.
|
|
25
|
+
*/
|
|
26
|
+
static distinctBy<T, K>(array: T[], keySelector: (item: T) => K): T[];
|
|
21
27
|
static filterByKey(filterValue: any, key: string, array: any[]): any[];
|
|
22
28
|
static flatten(array: any, indent?: number): any[];
|
|
23
29
|
/**
|