Home / Function/ isPlainObject() — astro Function Reference

isPlainObject() — astro Function Reference

Architecture documentation for the isPlainObject() function in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  b8bf0a11_d530_8bbc_e160_37c7adc4f13d["isPlainObject()"]
  12939e59_1f9e_fce5_2674_b633a076a433["index.ts"]
  b8bf0a11_d530_8bbc_e160_37c7adc4f13d -->|defined in| 12939e59_1f9e_fce5_2674_b633a076a433
  2da41ae9_8de9_5062_432d_09029f6fdec3["isLocalsSerializable()"]
  2da41ae9_8de9_5062_432d_09029f6fdec3 -->|calls| b8bf0a11_d530_8bbc_e160_37c7adc4f13d
  style b8bf0a11_d530_8bbc_e160_37c7adc4f13d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/middleware/index.ts lines 164–176

function isPlainObject(value: unknown): value is object {
	if (typeof value !== 'object' || value === null) return false;

	let proto = Object.getPrototypeOf(value);
	if (proto === null) return true;

	let baseProto = proto;
	while (Object.getPrototypeOf(baseProto) !== null) {
		baseProto = Object.getPrototypeOf(baseProto);
	}

	return proto === baseProto;
}

Domain

Subdomains

Frequently Asked Questions

What does isPlainObject() do?
isPlainObject() is a function in the astro codebase, defined in packages/astro/src/core/middleware/index.ts.
Where is isPlainObject() defined?
isPlainObject() is defined in packages/astro/src/core/middleware/index.ts at line 164.
What calls isPlainObject()?
isPlainObject() is called by 1 function(s): isLocalsSerializable.

Analyze Your Own Codebase

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

Try Supermodel Free