(value1, value2)
| 440 | } |
| 441 | |
| 442 | function compareNulls(value1, value2) { |
| 443 | if (isNull(value1) && isNull(value2)) { |
| 444 | return 0; |
| 445 | } |
| 446 | |
| 447 | if (isNull(value1)) { |
| 448 | return -1; |
| 449 | } else if (isNull(value2)) { |
| 450 | return 1; |
| 451 | } |
| 452 | |
| 453 | return null; |
| 454 | } |
| 455 | |
| 456 | export function stringComparator(field) { |
| 457 | const comparator = function (a, b) { |