Open peterdenev opened 9 years ago
If a constructor have a name:
var Person=Class({ init:function Person(){ } })
Class name can be get:
Person.constructorName //or var p = new Person(); p.class.constructorName
P.S. not the best way but works. N.B! It gets the "init", "_init", "$init" methods, but didn't look up for inherit data
As the commits say:
(Check out my repo for TypeValidation that can be used with ZNOW too)
If a constructor have a name:
Class name can be get:
P.S. not the best way but works. N.B! It gets the "init", "_init", "$init" methods, but didn't look up for inherit data