compare Namespace
Package: @esfx/fn
Functions
withComparer(comparer, allowNullishValues)
Creates a copy of compare
for a specific Comparer
.
Declaration
function withComparer<T>(comparer: Comparer<T>, allowNullishValues: true): (a: T | null | undefined, b: T | null | undefined) => number;
Type Parameters
- T
Parameters
- comparer
- Comparer<T>
- allowNullishValues
- true
Returns
(a: T | null | undefined, b: T | null | undefined) => number
withComparer(comparer, allowNullishValues)
Creates a copy of compare
for a specific Comparer
.
Declaration
function withComparer<T>(comparer: Comparer<T>, allowNullishValues?: boolean): (a: T, b: T) => number;
Type Parameters
- T
Parameters
- comparer
- Comparer<T>
- allowNullishValues
- boolean
Returns
(a: T, b: T) => number