There is room for improvement, in no particular order:
- Formatting
for ( i = 0; i < len; i++ )
should really follow normal formatting
for ( i = 0; i < len; i++ )
Formatting : ( subjective ), the splitting of conditionals into separate lines is overdone, function rig_props is the worst case of overdoing it
Arrow head coding : http://www.codinghorror.com/blog/2006/01/flattening-arrow-code.html If code has the following, then it was done wrong:
} ); } ); } } return obj; } } ); } return obj; }
Naming : please use camelCasing and meaningful names, the code is too hard to follow (
slc
,t
,nl
,un
,_tm
.. ), I understand you are used to it, but if you ever want other people to understand/maintain this, then you need to fix this.Naming : underscores used to indicate private properties/functions, they seem bad form for parameters (
_host_
,_aproto
)It defines .each(), you should really look into using
ForEach()
instead, also look intoreverse()
forflgIterBw
Functions like
_aproto.keep
should have at least a one-liner comment as to what it doesAll in all, the code is hard to maintain, not evenly commented and it does not seem to consider the advances made in js 1.6 ( ForEach, filter, etc. ) but it still counts on indexOf()
Finally, if the code were to be rewritten with the above in mind, it could get more meaningful code reviews because more reviewers could then grok it.