Skip to content
Myr

Refactored Collection#length()

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

authored by visionmedia · committed by visionmedia · parent d1f5c08 · 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
331 unmodified lines
332 * @api public333 */334 335 length: function() {336 if ('length' in this.arr)337 return this.arr.length338 return this.reduce(0, function(len){339 return ++len340 })341 }
14 unmodified lines