MCPcopy Index your code
hub / github.com/google-map-react/google-map-react / is

Function is

src/utils/shallowEqual.js:18–29  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

16 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
17 */
18function is(x, y) {
19 // SameValue algorithm
20 if (x === y) {
21 // Steps 1-5, 7-10
22 // Steps 6.b-6.e: +0 != -0
23 // Added the nonzero y check to make Flow happy, but it is redundant
24 return x !== 0 || y !== 0 || 1 / x === 1 / y;
25 }
26 // Step 6.a: NaN == NaN
27 // eslint-disable-next-line no-self-compare
28 return x !== x && y !== y;
29}
30
31/**
32 * Performs equality by iterating through keys on an object and returning false

Callers 1

shallowEqualFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected