Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.

== Function ==
=== Synopsis ===
<source lang="lua">
b = Object:typeOf( name )
</source>
=== Arguments ===
{{param|string|name|The name of the type to check for.}}
=== Returns ===
{{param|boolean|b|True if the object is of the specified type, false otherwise.}}
== Examples ==
=== Checking the type of an object ===
<source lang="lua">
image = love.graphics.newImage("test.png")
print(image:typeOf("Object")) -- outputs: true
print(image:typeOf("Drawable")) -- outputs: true
print(image:typeOf("Image")) -- outputs: true
print(image:typeOf("MouseJoint")) -- outputs: false
</source>
== See Also ==
* [[parent::Object]]
{{#set:Description=Checks whether an object is of a certain type.}}
{{#set:Since=000}}
[[Category:Functions]]
== Other Languages ==
{{i18n|Object:typeOf}}