* Equality that follows PostgreSQL float semantics for `NaN`/invalid Dates: * such values are equal to one another and unequal to anything else. For all * other values it defers to areValuesEqual. Operands must not be * null/undefined (callers handle UNKNOWN first).
(a: any, b: any)
| 25 | * null/undefined (callers handle UNKNOWN first). |
| 26 | */ |
| 27 | function valuesEqual(a: any, b: any): boolean { |
| 28 | if (isUnorderable(a) || isUnorderable(b)) { |
| 29 | return isUnorderable(a) && isUnorderable(b) |
| 30 | } |
| 31 | return areValuesEqual(a, b) |
| 32 | } |
| 33 | |
| 34 | function toDateValue(value: any): Date | null { |
| 35 | if (value instanceof Date) { |
no test coverage detected