UNPKG

astro

Version:

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

18 lines (17 loc) 553 B
const RenderInstructionSymbol = /* @__PURE__ */ Symbol.for("astro:render"); function createRenderInstruction(instruction) { return Object.defineProperty(instruction, RenderInstructionSymbol, { value: true }); } function isRenderInstruction(chunk) { return chunk && typeof chunk === "object" && chunk[RenderInstructionSymbol]; } function isScriptInstruction(chunk) { return chunk && typeof chunk === "object" && "type" in chunk && chunk.type === "script"; } export { createRenderInstruction, isRenderInstruction, isScriptInstruction };