@tilde-nlp/ngx-common 8.0.4 → 8.0.6
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/tilde-nlp-ngx-common.mjs +58 -23
- package/fesm2022/tilde-nlp-ngx-common.mjs.map +1 -1
- package/index.d.ts +22 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -698,24 +698,31 @@ declare class SortHelper {
|
|
|
698
698
|
*/
|
|
699
699
|
static sortByArray(objectArr: any[], sortByArray: any[], fieldName: string): void;
|
|
700
700
|
/**
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
701
|
+
* Transforms the input array of objects by sorting them based on the specified sortingValueKey.
|
|
702
|
+
* @param values - An array of objects to be sorted.
|
|
703
|
+
* @param sortingValueKey - The key by which the provided values should be sorted, leave it empty if you want to sort string[].
|
|
704
|
+
*/
|
|
705
705
|
static sortAlphabetically(values: any[], sortingValueKey?: string): any;
|
|
706
706
|
/**
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
static sortByNumber(values:
|
|
707
|
+
* Sorts an array of values by a specified numeric property or by their numeric value if no property is specified.
|
|
708
|
+
* @param values - The array of values to be sorted. Can be an array of objects or primitive numeric values.
|
|
709
|
+
* @param sortingValueKey - The key of the numeric property in the objects to sort by.
|
|
710
|
+
* @param desc - Flag indicating whether to sort in descending (true) or ascending (false) order.
|
|
711
|
+
*/
|
|
712
|
+
static sortByNumber<T>(values: T[], sortingValueKey?: string, desc?: boolean): T[];
|
|
713
713
|
/**
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
714
|
+
* Sorts an array of values by a specified boolean property or by their boolean value if no property is specified.
|
|
715
|
+
* @param values - The array of values to be sorted. Can be an array of objects or primitive boolean values.
|
|
716
|
+
* @param sortingValueKey - The key of the boolean property in the objects to sort by.
|
|
717
|
+
* @param desc - Flag indicating whether to sort in descending (true) or ascending (false) order.
|
|
718
|
+
*/
|
|
719
|
+
static sortByBoolean<T>(values: T[], sortingValueKey?: string, desc?: boolean): T[];
|
|
720
|
+
/**
|
|
721
|
+
* This method is intended to be used with sorting methods like Array.sort(). It compares two strings, a and b, against a reference substring input.
|
|
722
|
+
* @param a - The first string to be compared.
|
|
723
|
+
* @param b - The second string to be compared.
|
|
724
|
+
* @param input - The reference substring used to influence the sorting order.
|
|
725
|
+
*/
|
|
719
726
|
static sortByStartingLetter(a: string, b: string, input: string): number;
|
|
720
727
|
}
|
|
721
728
|
|