UNPKG

element-vir

Version:

Heroic. Reactive. Declarative. Type safe. Web components without compromise.

20 lines (19 loc) 712 B
import { check } from '@augment-vir/assert'; /** * Checks if the input is an instance of {@link MinimalDefinitionWithInputs}. * * @category Internal */ export function isMinimalDefinitionWithInputs(value) { return (check.hasKey(value, '_elementVirIsMinimalDefinitionWithInputs') && !!value._elementVirIsMinimalDefinitionWithInputs); } /** * Checks if the input is an object that has a `tagName` property. Used inside of the HTML tagged * template functions for checking if interpolated values should be treated as element tags. * * @category Internal */ export function hasTagName(value) { return check.hasKey(value, 'tagName') && !!value.tagName && typeof value.tagName === 'string'; }