Skip to content
Myr

Using V8s #reduce()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent b514453 · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:lib/express/collection.js+2 added
79 unmodified lines
80 * @api public81 */82 83 reduce: function(memo, fn) {84 if (this.arr.reduce)85 return this.arr.reduce(fn, memo)86 this.each(function(val, key){87 memo = fn(memo, val, key)88 })89 return memo
227 unmodified lines