(x: any, y: any)
| 2 | * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue |
| 3 | */ |
| 4 | export function SameValue(x: any, y: any): boolean { |
| 5 | if (Object.is) { |
| 6 | return Object.is(x, y) |
| 7 | } |
| 8 | if (x === y) { |
| 9 | return x !== 0 || 1 / x === 1 / y |
| 10 | } |
| 11 | return x !== x && y !== y |
| 12 | } |
no outgoing calls
no test coverage detected