astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
15 lines (14 loc) • 484 B
JavaScript
function shouldRenderHeadInstruction(state) {
return !state.hasRenderedHead && !state.partial;
}
function shouldRenderMaybeHeadInstruction(state) {
return !state.hasRenderedHead && !state.headInTree && !state.partial;
}
function shouldRenderInstruction(type, state) {
return type === "head" ? shouldRenderHeadInstruction(state) : shouldRenderMaybeHeadInstruction(state);
}
export {
shouldRenderHeadInstruction,
shouldRenderInstruction,
shouldRenderMaybeHeadInstruction
};