UNPKG

compare-by

Version:

A versatile utility library for sorting arrays of objects by one or multiple keys with customizable sort directions.

10 lines 399 B
import { CompareDirection } from './types'; /** * Compare numeric values. * @param {number} a The first value. * @param {number} b The second value. * @param {CompareDirection} dir The direction to compare. * @returns {number} 0 if values are equal. */ export declare const compareNumbers: (a: number, b: number, dir?: CompareDirection) => number; //# sourceMappingURL=compare-numbers.d.ts.map