Merge pull request #500 from bryanwoods/master

Aliases `_.take()` to `_.first()` and `_.head()`
This commit is contained in:
Jeremy Ashkenas
2012-04-02 12:43:06 -07:00
2 changed files with 5 additions and 3 deletions

View File

@@ -12,6 +12,8 @@ $(document).ready(function() {
equal(result, 4, 'works on an arguments object.');
result = _.map([[1,2,3],[1,2,3]], _.first);
equal(result.join(','), '1,1', 'works well with _.map');
result = (function() { return _.take([1,2,3], 2); })();
equal(result.join(','), '1,2', 'aliased as take');
});
test("arrays: rest", function() {