Object.getConstructorOf();

L2L 2L emanuelallen at hotmail.com
Thu Sep 18 20:38:39 PDT 2014


I'll like to also proposal all method dealing with prototype as in getPrototypeOf, have a counterpart for constructor.

E-S4L
N-S4L
J-S4L

> On Sep 17, 2014, at 11:13 AM, "L2L 2L" <emanuelallen at hotmail.com> wrote:
> 
> 
> 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
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list