Skip to content
Myr

Collection#all() utilizing V8s #every()

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

authored by visionmedia · committed by visionmedia · parent 7a4a900 · 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
217 unmodified lines
218 * @api public219 */220 221 all: function(fn) {222 if (this.arr.every)223 return this.arr.every(fn)224 return this.reduce(true, function(state, val, key){225 if (!state) throw $break226 return !! fn(val, key)227 })
87 unmodified lines