renderToString() — astro Function Reference
Architecture documentation for the renderToString() function in rendering.test.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 3b6f87fa_adbc_be42_e3af_684b4007ccdd["renderToString()"] e3fe003a_df56_8dae_828e_d1fb163c9c09["rendering.test.js"] 3b6f87fa_adbc_be42_e3af_684b4007ccdd -->|defined in| e3fe003a_df56_8dae_828e_d1fb163c9c09 style 3b6f87fa_adbc_be42_e3af_684b4007ccdd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/units/render/rendering.test.js lines 251–271
function renderToString(item) {
if (isPromise(item)) {
return item.then(renderToString);
}
let result = '';
const destination = {
write: (chunk) => {
result += chunk.toString();
},
};
const renderResult = item.render(destination);
if (isPromise(renderResult)) {
return renderResult.then(() => result);
}
return result;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does renderToString() do?
renderToString() is a function in the astro codebase, defined in packages/astro/test/units/render/rendering.test.js.
Where is renderToString() defined?
renderToString() is defined in packages/astro/test/units/render/rendering.test.js at line 251.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free