Skip to content

isVueComponent

Since v0.3.1

Checks if a value is a Vue component (SFC or defineComponent result).

Vue components are identified by:

  • Having __name (SFC compiled marker)
  • Having setup function (Composition API component)
  • Having render function (Options API component)
  • Being an ES6 class (class-based component)

Regular functions (ctx) => HTMLElement that are already processed will not match these checks, making this idempotent.

isVueComponent(value: unknown): value
NameTypeDescription
valueunknown
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt