Skip to main content

IsComponent

Checks if a userdata value is a Seam component.

TypeSinceScoped
Utility0.3.3No

Constructor

IsComponent(CheckedObject : any)

Usage

If you need to quickly check if a userdata is a component, use this. It can be used like so:

local IsComponent = Seam.IsComponent

local MyComponent = require(path.to.component) -- Assume this is a Seam component built with Component()
local NotComponent = {Foo = "Hi!"}

print(IsComponent(MyComponent)) -- Prints true
print(IsComponent(NotComponent)) -- Prints false