Reduce _.reduceRight and update vendors.

Former-commit-id: f7250ccb4b8f15052c1f1420947c2ac68963a92c
This commit is contained in:
John-David Dalton
2012-09-20 21:06:32 -07:00
parent 5afeed56ef
commit 473dd7660b
8 changed files with 130 additions and 120 deletions

View File

@@ -157,6 +157,10 @@ $(document).ready(function() {
numbers = [1, 40, 40, 40, 40, 40, 40, 40, 50, 60, 70]; num = 40;
index = _.indexOf(numbers, num, true);
equal(index, 1, '40 is in the list');
numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3];
index = _.indexOf(numbers, 2, 5);
equal(index, 7, 'supports the fromIndex argument');
});
test("lastIndexOf", function() {
@@ -167,6 +171,10 @@ $(document).ready(function() {
var result = (function(){ return _.lastIndexOf(arguments, 1); })(1, 0, 1, 0, 0, 1, 0, 0, 0);
equal(result, 5, 'works on an arguments object');
equal(_.indexOf(null, 2), -1, 'handles nulls properly');
numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3];
index = _.lastIndexOf(numbers, 2, 2);
equal(index, 1, 'supports the fromIndex argument');
});
test("range", function() {