@zelgadis87/utils-core 4.13.1 → 4.13.2
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/package.json
CHANGED
package/src/sorting/Sorter.ts
CHANGED
|
@@ -365,7 +365,7 @@ type TSorterStepFull<T, Ret> = TSorterStepForRecords<T, Ret>
|
|
|
365
365
|
& TSorterStepForChainables<T, Ret>
|
|
366
366
|
& TSorterStepForUsing<T, Ret>
|
|
367
367
|
;
|
|
368
|
-
type TSorterStarter<T> =
|
|
368
|
+
type TSorterStarter<T> = TSorterStepUsing<T, TSorter<T>>;
|
|
369
369
|
export type TSorterBuilder<T> = ( builder: TSorterStarter<T> ) => TSorter<T>;
|
|
370
370
|
|
|
371
371
|
type TStringComparisonOptions = TCompareFunctionOptions & { ignoreCase: boolean };
|
|
@@ -389,13 +389,6 @@ const defaultBooleanComparisonOptions = { ...defaultCompareValuesOptions } as co
|
|
|
389
389
|
type TPrioritizeOptions = {};
|
|
390
390
|
const defaultPrioritizeOptions = {} as const satisfies Partial<TPrioritizeOptions>;
|
|
391
391
|
|
|
392
|
-
/**
|
|
393
|
-
* @deprecated[2023-10-19]: Use {@link Sorter.createFor} instead.
|
|
394
|
-
**/
|
|
395
|
-
export function createSorterFor<T>() {
|
|
396
|
-
return doCreateEmpty<T>();
|
|
397
|
-
}
|
|
398
|
-
|
|
399
392
|
export const Sorter = {
|
|
400
393
|
createFor: <T>() => doCreateEmpty<T>(),
|
|
401
394
|
sort: <T>( arr: TReadableArray<T>, builder: TSorterBuilder<T> ) => builder( doCreateEmpty() ).sort( arr ),
|