* inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
(x, y)
| 588 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 589 | */ |
| 590 | function is(x, y) { |
| 591 | // SameValue algorithm |
| 592 | if (x === y) { |
| 593 | // Steps 1-5, 7-10 |
| 594 | // Steps 6.b-6.e: +0 != -0 |
| 595 | // Added the nonzero y check to make Flow happy, but it is redundant |
| 596 | return x !== 0 || y !== 0 || 1 / x === 1 / y; |
| 597 | } else { |
| 598 | // Step 6.a: NaN == NaN |
| 599 | return x !== x && y !== y; |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | /** |
| 604 | * Performs equality by iterating through keys on an object and returning false |
no outgoing calls
no test coverage detected