Home / File/ objectIs.js — react Source File

objectIs.js — react Source File

Architecture documentation for objectIs.js, a javascript file in the react codebase. 0 imports, 1 dependents.

File javascript BabelCompiler Optimization 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  6e14608c_da3e_3b32_c806_aa3aab42a0c9["objectIs.js"]
  453d8884_196c_9b47_f492_31e5c07005e7["shallowEqual.js"]
  453d8884_196c_9b47_f492_31e5c07005e7 --> 6e14608c_da3e_3b32_c806_aa3aab42a0c9
  style 6e14608c_da3e_3b32_c806_aa3aab42a0c9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

/**
 * 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
 */
function is(x: any, y: any) {
  return (
    (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare
  );
}

const objectIs: (x: any, y: any) => boolean =
  // $FlowFixMe[method-unbinding]
  typeof Object.is === 'function' ? Object.is : is;

export default objectIs;

Domain

Subdomains

Functions

Frequently Asked Questions

What does objectIs.js do?
objectIs.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in objectIs.js?
objectIs.js defines 1 function(s): is.
What files import objectIs.js?
objectIs.js is imported by 1 file(s): shallowEqual.js.
Where is objectIs.js in the architecture?
objectIs.js is located at packages/shared/objectIs.js (domain: BabelCompiler, subdomain: Optimization, directory: packages/shared).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free