|
|
|
@ -33,11 +33,8 @@ const numericComparators: Record<string, Comparator<number>> = {
|
|
|
|
function buildComparator(operator: string, comparedValue: string) {
|
|
|
|
function buildComparator(operator: string, comparedValue: string) {
|
|
|
|
comparedValue = comparedValue.toLowerCase();
|
|
|
|
comparedValue = comparedValue.toLowerCase();
|
|
|
|
|
|
|
|
|
|
|
|
if (operator in numericComparators) {
|
|
|
|
if (operator in numericComparators && !isNaN(+comparedValue)) {
|
|
|
|
const floatValue = parseFloat(comparedValue);
|
|
|
|
return numericComparators[operator](parseFloat(comparedValue));
|
|
|
|
if (!isNaN(floatValue)) {
|
|
|
|
|
|
|
|
return numericComparators[operator](floatValue);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (operator in stringComparators) {
|
|
|
|
if (operator in stringComparators) {
|
|
|
|
|