MCPcopy
hub / github.com/facebook/react / is

Function is

packages/shared/objectIs.js:14–18  ·  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: any, y: any)

Source from the content-addressed store, hash-verified

12 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
13 */
14function is(x: any, y: any) {
15 return (
16 (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare
17 );
18}
19
20const objectIs: (x: any, y: any) => boolean =
21 // $FlowFixMe[method-unbinding]

Callers 13

getContextChangedFunction · 0.85
shallowEqualFunction · 0.85
memoizedSelectorFunction · 0.85
checkIfSnapshotChangedFunction · 0.85
areHookInputsEqualFunction · 0.85
ReactFiberHooks.jsFile · 0.85
ifFunction · 0.85
enqueueRenderPhaseUpdateFunction · 0.85
checkIfContextChangedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected