Skip to content
Myr

Added Collection#any()

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

authored by visionmedia · committed by visionmedia · parent b9d526c · Browse files · 2 files+23 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

2 files+23 added−0 removed

  • tests:+10 added−0 removed
  • other:+13 added−0 removed

2 files+23 added−0 removed

modified:lib/express/collection.js+13 added
modified:spec/spec.collection.js+10 added
111 unmodified lines
112 result.should.eql 'raz'113 end114 end115 116 describe '#any()'117 it 'should return true when found'118 $(['foo', 'bar']).any(function(val){ return val.charAt(0) == 'b' }).should.be_true119 end120 121 it 'should return false when not found'122 $(['foo', 'bar']).any(function(val){ return val.charAt(0) == 'r' }).should.be_false123 end124 end125 126 describe '#slice()'127 it 'should return a slice of values'128 var collection = $(['foo', 'bar', 'baz']).slice(1, 3)129 collection.at(0).should.eql 'bar'
12 unmodified lines