ascend
Creates an ascending comparator from an accessor function.
Usage
ascend<T>(fn: (value: T) => number | string)
Creates an ascending comparator from an accessor function.
Parameters
fn(value: T) => number | stringrequired
the function to apply.
Returns
an ascending comparator suitable for Array.prototype.sort or toSorted.