Say I have code like the following.
Crafty.c("SomeType",{//do something... }); var obj=Crafty.e("SomeType");
Can someone tell me if there is a function to check the type of an object?
Example:
Crafty.isComponent(obj,"SomeType")==true
or
Crafty.getComponents(obj)=="SomeType"
source share