MCPcopy Index your code
hub / github.com/mobxjs/mobx / is

Function is

packages/mobx-react/src/utils/utils.ts:22–29  ·  view source on GitHub ↗
(x: any, y: any)

Source from the content-addressed store, hash-verified

20}
21
22function is(x: any, y: any): boolean {
23 // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js
24 if (x === y) {
25 return x !== 0 || 1 / x === 1 / y
26 } else {
27 return x !== x && y !== y
28 }
29}
30
31// based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js
32const hoistBlackList = {

Callers 1

shallowEqualFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected