What is the best way to get an object's name in all browsers OR how to get an object's type name in IE ?
In this case the Matrix object is defined in an external package. I just need the name of the type - i'm not interested in a thousand instanceof
's ...
EDIT
I'll be more specific about my problem. This is Matrix
declaration from math.js
. I've got a result object and i want to check if it's a Matrix. Math.js has some types of it's own (like Matrix, Unit) but it also uses common types like String, Number and Array. I'm trying to get the result type as string and i'm trying to avoid checking each type specifically.