MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / is

Function is

code/composition/public/app.js:693–704  ·  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

691 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
692 */
693function is(x, y) {
694 // SameValue algorithm
695 if (x === y) {
696 // Steps 1-5, 7-10
697 // Steps 6.b-6.e: +0 != -0
698 // Added the nonzero y check to make Flow happy, but it is redundant
699 return x !== 0 || y !== 0 || 1 / x === 1 / y;
700 } else {
701 // Step 6.a: NaN == NaN
702 return x !== x && y !== y;
703 }
704}
705
706/**
707 * Performs equality by iterating through keys on an object and returning false

Callers 2

shallowEqualFunction · 0.70
validateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected