An advanced type-check function that returns accurate object types, unlike native typeof

xtag.typeOf(UNKNOWN_OBJECT)

ArgumentsType
UNKNOWN_OBJECTObjectAny valid JavaScript or DOM object
xtag.typeOf(document) // returns "htmldocument"
typeof document // returns "object"

xtag.typeOf(document.body.children) // returns "htmlcollection"
typeof document.body.children // returns "object"

xtag.typeOf(/foo/) // returns "regexp"
typeof /foo/ // returns "object"