import { SortDirectionNumber } from '../enums/sortDirectionNumber.enum';
export const numericSortComparer = (value1, value2, sortDirection = SortDirectionNumber.neutral, sortColumn, gridOptions) => {
    const checkForUndefinedValues = sortColumn?.valueCouldBeUndefined ?? gridOptions?.cellValueCouldBeUndefined ?? false;
    const x = (isNaN(value1) || value1 === '' || value1 === null || (checkForUndefinedValues && value1 === undefined)) ? -Infinity : parseFloat(value1);
    const y = (isNaN(value2) || value2 === '' || value2 === null || (checkForUndefinedValues && value2 === undefined)) ? -Infinity : parseFloat(value2);
    return sortDirection * (x === y ? 0 : (x > y ? 1 : -1));
};
//# sourceMappingURL=numericSortComparer.js.map