(x: any, y: any)
| 34 | // Object.is polyfill |
| 35 | // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 36 | export function objectIs (x: any, y: any) { |
| 37 | if (x === y) { // Steps 1-5, 7-10 |
| 38 | // Steps 6.b-6.e: +0 != -0 |
| 39 | return x !== 0 || 1 / x === 1 / y |
| 40 | } |
| 41 | // eslint-disable-next-line no-self-compare |
| 42 | return x !== x && y !== y |
| 43 | } |
no outgoing calls
no test coverage detected