astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
20 lines (19 loc) • 630 B
JavaScript
function isAstroComponentFactory(obj) {
return obj == null ? false : obj.isAstroComponentFactory === true;
}
function isAPropagatingComponent(result, factory) {
const hint = getPropagationHint(result, factory);
return hint === "in-tree" || hint === "self";
}
function getPropagationHint(result, factory) {
let hint = factory.propagation || "none";
if (factory.moduleId && result.componentMetadata.has(factory.moduleId) && hint === "none") {
hint = result.componentMetadata.get(factory.moduleId).propagation;
}
return hint;
}
export {
getPropagationHint,
isAPropagatingComponent,
isAstroComponentFactory
};