Skip to content
Myr

Added Collection#first()

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

authored by visionmedia · committed by visionmedia · parent 47e3eab · Browse files · 2 files+22 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+22 added−0 removed

  • tests:+11 added−0 removed
  • other:+11 added−0 removed

2 files+22 added−0 removed

modified:lib/express/collection.js+11 added
modified:spec/spec.collection.js+11 added
76 unmodified lines
77 collection.at(0).should.eql 'BAR'78 collection.at(1).should.eql 'RAZ'79 end80 end81 82 describe '#first()'83 it 'should return the first value'84 $(['foo']).first().should.eql 'foo'85 end86 87 it 'should work with objects'88 $({ foo: 'bar' }).first().should.eql 'bar'89 end 90 end91 92 end93end