(other Value)
| 217 | } |
| 218 | |
| 219 | func (i valueInt) Equals(other Value) bool { |
| 220 | switch o := other.(type) { |
| 221 | case valueInt: |
| 222 | return i == o |
| 223 | case *valueBigInt: |
| 224 | return (*big.Int)(o).Cmp(big.NewInt(int64(i))) == 0 |
| 225 | case valueFloat: |
| 226 | return float64(i) == float64(o) |
| 227 | case String: |
| 228 | return o.ToNumber().Equals(i) |
| 229 | case valueBool: |
| 230 | return int64(i) == o.ToInteger() |
| 231 | case *Object: |
| 232 | return i.Equals(o.toPrimitive()) |
| 233 | } |
| 234 | |
| 235 | return false |
| 236 | } |
| 237 | |
| 238 | func (i valueInt) StrictEquals(other Value) bool { |
| 239 | switch o := other.(type) { |
nothing calls this directly
no test coverage detected