UNPKG

forto-sorter

Version:

Fast and powerful array sorting. Sort by any property in any direction with easy to read syntax.

4 lines (3 loc) 204 B
import { IOrder } from './../types/order'; import { IComparer } from './../interfaces/comparer'; export const castComparer = (comparer:IComparer) => (a, b, order:IOrder) => comparer(a, b, order) * order;