UNPKG

@thi.ng/compare

Version:

Comparators with support for types implementing the @thi.ng/api/ICompare interface

13 lines 543 B
import type { Comparator } from "@thi.ng/api"; /** * Returns a comparator which applies given comparators in given order for as * long as the current comparator returns 0. In other words, returns the result * of the first comparator with non-zero result, or if none does, returns zero. * * @remarks * Provides iteration-free fast past paths for up to 4 comparators. * * @param cmp */ export declare const composeComparators: <T = any>(cmp: Comparator<T>, ...xs: Comparator<T>[]) => Comparator<T>; //# sourceMappingURL=compose.d.ts.map