(a: BareItem, b: BareItem)
| 822 | |
| 823 | // Compare bare items for equality |
| 824 | function bareItemsEqual(a: BareItem, b: BareItem): boolean { |
| 825 | // Handle integer/decimal comparison - JSON loses distinction between 1 and 1.0 |
| 826 | if ( |
| 827 | (a.type === "integer" || a.type === "decimal") && |
| 828 | (b.type === "integer" || b.type === "decimal") |
| 829 | ) { |
| 830 | return (a.value as number) === (b.value as number); |
| 831 | } |
| 832 | if (a.type !== b.type) return false; |
| 833 | if (a.type === "binary" && b.type === "binary") { |
| 834 | const aVal = a.value as Uint8Array; |
| 835 | const bVal = b.value as Uint8Array; |
| 836 | if (aVal.length !== bVal.length) return false; |
| 837 | return aVal.every((v, i) => v === bVal[i]); |
| 838 | } |
| 839 | if (a.type === "date" && b.type === "date") { |
| 840 | return (a.value as Date).getTime() === (b.value as Date).getTime(); |
| 841 | } |
| 842 | return a.value === b.value; |
| 843 | } |
| 844 | |
| 845 | // Compare parameters for equality |
| 846 | function paramsEqual( |
no outgoing calls
no test coverage detected