UNPKG

scrivito

Version:

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

18 lines (12 loc) 427 B
import { InternalError } from 'scrivito_sdk/common'; type HasComponentHandler = (name: string) => boolean; let hasComponentHandler: HasComponentHandler | undefined; export function hasComponent(name: string): boolean { if (!hasComponentHandler) { throw new InternalError(); } return hasComponentHandler(name); } export function setHasComponentHandler(func: HasComponentHandler) { hasComponentHandler = func; }