Object.getConstructorOf();

L2L 2L emanuelallen at hotmail.com
Wed Sep 17 00:35:40 PDT 2014


Object.getConstructorOf = function (obj){
    return (((obj).constructor).toString().match(/\s\w+/)[0].trim());
}

Object.getConstructorOf(function(){});//function

/*
there is no way to test for constructor via function.
*/

E-S4L
N-S4L
J-S4L


More information about the es-discuss mailing list