Skip to content
Myr

Added Collection#includes()

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

authored by visionmedia · committed by visionmedia · parent 5b3293a · Browse files · 1 file+17 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+17 added−0 removed

  • other:+17 added−0 removed

1 file+17 added−0 removed

modified:lib/express/collection.js+17 added
208 unmodified lines
209 array.push(val)210 return array211 }))212 },213 214 /**215 * Check if all arguments passed are found within 216 * the collection using the === operator.217 *218 * @return {bool}219 * @api public220 */221 222 includes: function() {223 var self = this224 return $(arguments).all(function(arg){225 return self.any(function(val){226 return val === arg227 })228 })229 },230 231 /**232 * Return the first _n_ value(s), defaults to 1.233 *
313 unmodified lines