apiref
@dtinth/comparator@0.0.3

ComparatorX.from()  Function

Enhances a Comparator instance with additional methods as defined in the ComparatorX interface.

Signature

function from<T>(comparator: Comparator<T>): ComparatorX<T>;

Remarks

The passed in comparator will mutated to include the additional methods at runtime.

Parameters

ParameterTypeDescription
comparatorComparator<T>

the Comparator instance to enhance

(Returns)ComparatorX<T>

the enhanced instance