Skip to content
Myr

Added first(n) support

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

authored by visionmedia · committed by visionmedia · parent 3e845a8 · Browse files · 2 files+9 added−3 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+9 added−3 removed

  • tests:+5 added−0 removed
  • other:+4 added−3 removed

2 files+9 added−3 removed

modified:lib/express/collection.js+4 added-3 removed
modified:spec/spec.collection.js+5 added
82 unmodified lines
83 it 'should return the first value'84 $(['foo']).first().should.eql 'foo'85 end86 87 it 'should return the first n values'88 $([5,4,3,2,1]).first(2).at(0).should.eql 589 $([5,4,3,2,1]).first(2).at(1).should.eql 490 end91 92 it 'should work with objects'93 $({ foo: 'bar' }).first().should.eql 'bar'94 end 95 end
17 unmodified lines