Home / Function/ isObjectPrototype() — react Function Reference

isObjectPrototype() — react Function Reference

Architecture documentation for the isObjectPrototype() function in ReactSerializationErrors.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  e1809a07_e5d2_d8a2_2d86_991246c59e38["isObjectPrototype()"]
  07b21cf4_35fa_b825_b4d7_94b229a65c00["ReactSerializationErrors.js"]
  e1809a07_e5d2_d8a2_2d86_991246c59e38 -->|defined in| 07b21cf4_35fa_b825_b4d7_94b229a65c00
  c134a24e_7fc7_178a_2c77_995e056d894a["isSimpleObject()"]
  c134a24e_7fc7_178a_2c77_995e056d894a -->|calls| e1809a07_e5d2_d8a2_2d86_991246c59e38
  style e1809a07_e5d2_d8a2_2d86_991246c59e38 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shared/ReactSerializationErrors.js lines 32–52

function isObjectPrototype(object: any): boolean {
  if (!object) {
    return false;
  }
  const ObjectPrototype = Object.prototype;
  if (object === ObjectPrototype) {
    return true;
  }
  // It might be an object from a different Realm which is
  // still just a plain simple object.
  if (getPrototypeOf(object)) {
    return false;
  }
  const names = Object.getOwnPropertyNames(object);
  for (let i = 0; i < names.length; i++) {
    if (!(names[i] in ObjectPrototype)) {
      return false;
    }
  }
  return true;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does isObjectPrototype() do?
isObjectPrototype() is a function in the react codebase, defined in packages/shared/ReactSerializationErrors.js.
Where is isObjectPrototype() defined?
isObjectPrototype() is defined in packages/shared/ReactSerializationErrors.js at line 32.
What calls isObjectPrototype()?
isObjectPrototype() is called by 1 function(s): isSimpleObject.

Analyze Your Own Codebase

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

Try Supermodel Free