milojs/proto

View on GitHub
lib/dot/definitions.def

Summary

Maintainability
Test Coverage
{{## def.selfArg:_only:
    {{? it.mode == 'functions' }}
        self{{?!_only}},{{?}}
    {{?}}
#}}

{{## def.oneArg: {{? it.mode == 'functions' }}self{{?}} #}}
{{## def.arg: {{? it.mode == 'functions' }}self,{{?}} #}}
{{## def.this: {{? it.mode == 'methods' }}this{{??}}self{{?}} #}}
{{## def.self: {{? it.mode == 'methods' }}this.self{{??}}self{{?}} #}}
{{## def.varSelf: {{? it.mode == 'methods' }}var self = this.self;{{?}} #}}
{{## def.varArgs: var args = slice.call(arguments{{? it.mode == 'functions' }}, 1{{?}}); #}}
{{## def.varArguments: var args = {{? it.mode == 'functions' }}slice.call(arguments, 1){{??}}arguments{{?}}; #}}
{{## def.restArgs:count:
    var args = slice.call(arguments, {{?it.mode == 'functions'}}{{=+count+1}}{{??}}{{=count}}{{?}});
#}}

{{## def.return:_result:
    {{? it.mode == 'methods' }}
        this.self = _result;
        return this;
    {{??}}
        return _result;
    {{?}}
#}}

{{## def.intReturn:_result:
    {{? it.mode == 'methods' }}
        this.self = {{=_result}};
        return this;
    {{??}}
        return {{=_result}};
    {{?}}
#}}

{{## def.toArray:_arr: Array.prototype.slice.call(_arr) #}}

{{## def.iter:_arr: for (var i=0; i<_arr.length; i++) #}}
{{## def.iter2:_arr: for (var j=0; j<_arr.length; j++) #}}