- toObject : function()
+ toJSON : function()
{
- function array2object(a)
- {
-
- var r = [];
- a.forEach(function(e) {
- r.push(e.toObject());
- });
- return r;
- }
-
- var ret = { };
+
+ var ret = { '*object' : 'Symbol' };
for (var i in this) {
if (Symbol.hide.indexOf(i) > -1) {
continue;
case 'requires':
case 'returns':
case 'see':
- ret[i] = array2object(this[i],true);
- continue;
-
- //objects..
-
+ case 'cfgs': // key val of doctags..
case 'comment' :
- print(JSON.stringify(this[i]));
- ret[i] = this[i].toObject();
- continue;
+ ret[i] = this[i]
+ continue;
+
//skip
case 'inheritsFrom':
case 'childClasses':
case 'string':
case 'number':
+ case 'boolean':
ret[i] = this[i]; continue;
default:
print("unknown type:" + typeof(this[i]));
if (memberOfs.length) {
this.memberOf = memberOfs[0].desc;
this.memberOf = this.memberOf.replace(/\.prototype\.?/g, "#");
+ this.name = this.name.split('.').pop();
+ this.name = this.name.split('#').pop();
+ this.name = this.memberOf + this.name;
+ this._name = this.memberOf + this._name;
}
/*~t
ns[i] = t[i];
}
return ns;
-}
\ No newline at end of file
+}