uniqueElements() — astro Function Reference
Architecture documentation for the uniqueElements() function in head.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD f44c0a00_4188_3a7b_f84f_c3d91c7997ef["uniqueElements()"] fab8dbd2_7a6f_1571_b04b_4d0b3cd4348b["head.ts"] f44c0a00_4188_3a7b_f84f_c3d91c7997ef -->|defined in| fab8dbd2_7a6f_1571_b04b_4d0b3cd4348b style f44c0a00_4188_3a7b_f84f_c3d91c7997ef fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/runtime/server/render/head.ts lines 9–15
const uniqueElements = (item: any, index: number, all: any[]) => {
const props = JSON.stringify(item.props);
const children = item.children;
return (
index === all.findIndex((i) => JSON.stringify(i.props) === props && i.children == children)
);
};
Domain
Subdomains
Source
Frequently Asked Questions
What does uniqueElements() do?
uniqueElements() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/head.ts.
Where is uniqueElements() defined?
uniqueElements() is defined in packages/astro/src/runtime/server/render/head.ts at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free