Home / Function/ safeStringify() — astro Function Reference

safeStringify() — astro Function Reference

Architecture documentation for the safeStringify() function in utils.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  7bb3b03f_48da_08b4_1965_31b0ba5fc501["safeStringify()"]
  7a09e708_c090_71c0_8138_7343699b1865["utils.ts"]
  7bb3b03f_48da_08b4_1965_31b0ba5fc501 -->|defined in| 7a09e708_c090_71c0_8138_7343699b1865
  0e6f24d4_1492_e2de_23bc_f6c6a92b79e7["safeStringifyReplacer()"]
  7bb3b03f_48da_08b4_1965_31b0ba5fc501 -->|calls| 0e6f24d4_1492_e2de_23bc_f6c6a92b79e7
  style 7bb3b03f_48da_08b4_1965_31b0ba5fc501 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/utils.ts lines 904–907

export function safeStringify(value: unknown) {
	const seen = new WeakSet();
	return JSON.stringify(value, safeStringifyReplacer(seen));
}

Subdomains

Frequently Asked Questions

What does safeStringify() do?
safeStringify() is a function in the astro codebase, defined in packages/astro/src/content/utils.ts.
Where is safeStringify() defined?
safeStringify() is defined in packages/astro/src/content/utils.ts at line 904.
What does safeStringify() call?
safeStringify() calls 1 function(s): safeStringifyReplacer.

Analyze Your Own Codebase

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

Try Supermodel Free