src/core/query.js in entityjs-0.4.2 vs src/core/query.js in entityjs-0.4.3

- old
+ new

@@ -365,9 +365,18 @@ } }); return val; } + + p.sum = function(method, context){ + var val = 0; + + this.each(function(e, i, l){ + val += method.call(context || this, e, i, l); + }); + return val; + } //without this filter would return a normal array. p.filter = function(){ return re(Array.prototype.filter.apply(this, arguments)); } \ No newline at end of file