import { Comparator, ComparatorMode } from '../../typings/function-types'; export declare namespace Comparators { /** * @public * @module comparators * @param {String} a Input value. * @param {String} b Input value to compare with. * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareByOrder: (a: any, b: any) => number; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compare: (a: T, b: T) => number; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {ComparatorMode} mode comparator mode (ascending / descending) * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareByLocale: (a: T, b: T, mode?: ComparatorMode) => number; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {ComparatorMode} mode comparator mode (ascending / descending) * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareIgnoreCase: (a: T, b: T, mode?: ComparatorMode) => number; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {ComparatorMode} mode comparator mode (ascending / descending) * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareByLocaleIgnoreCase: (a: T, b: T, mode?: ComparatorMode) => number; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {ComparatorMode} mode comparator mode (ascending / descending) * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareByLength: (a: T, b: T, mode?: ComparatorMode) => number; /** * @public * @module comparators * @param {String} prop Input string. * @param {String} comparator Input string to compare with. * @return {Function} -1 - lower, 0 - equals, 1 - greater * * @example * s.sort(compareByPropertyKey('last', compareByPropertyKey('first'))); */ const compareByPropertyKey: (prop: PropertyKey, comparator?: import("../../typings/function-types").BiProcessor) => import("../../typings/function-types").BiProcessor; /** * @public * @module comparators * @param prop initial input @link String} or {@link Number} column name * @param comparator initial input {@link Comparator} to operate by * @return {@link Number} -1 - lower, 0 - equals, 1 - greater */ const compareByPropertyDefault: (prop: PropertyKey, comparator?: import("../../typings/function-types").BiProcessor) => import("../../typings/function-types").BiProcessor; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {String} value Property name. * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareByProperty: (a: T, b: T, value: PropertyKey) => number; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {PropertyKey} prop property to compare by * @param {ComparatorMode} mode comparator mode (ascending/descending) * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareByPropertyOrder: (a: T, b: T, prop: PropertyKey, mode?: ComparatorMode) => number; /** * @public * @param {Comparator} comparators collection to operate by */ const compareBy: (...comparators: import("../../typings/function-types").BiProcessor[]) => import("../../typings/function-types").BiProcessor; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {ComparatorMode} mode comparator mode (ascending/descending) * @param {PropertyKey} props property collection to compare by * @return {number} -1 - lower, 0 - equals, 1 - greater */ const compareByProperties: (a: T, b: T, mode?: ComparatorMode, ...props: PropertyKey[]) => number; /** * @public * @module comparators * @param {String} a Input string. * @param {String} b Input string to compare with. * @param {String} locale Language locale. * @param {Object} options Optional. Additional properties of comparison. * @return {number} -1 - lower, 0 - equals, 1 - greater * * @example * options = { sensitivity: 'base' } * locale = 'sv' */ const compareByLocaleOptions: (a: T, b: T, mode?: ComparatorMode, locale?: string | undefined, options?: any) => number; /** * @public * @module comparators * @return {number} -1 - lower, 0 - equals, 1 - greater * @param list initial input {@link string} array of items to compare by */ const normalizeAndCompare: import("../../typings/function-types").TriProcessor; } //# sourceMappingURL=comparators.d.ts.map