Optimize _.contains.

Former-commit-id: b50628adedd21fe2c099f4dcab1aa9f0036a22ed
This commit is contained in:
John-David Dalton
2012-11-10 23:09:23 -08:00
parent 3b9bd944fb
commit 07cbfdb424
5 changed files with 74 additions and 62 deletions

View File

@@ -644,6 +644,7 @@
equal(object.fn(), 2, '_.bind: ' + basename);
ok(lodash.clone(array, true)[0] === array[0], '_.clone should be shallow: ' + basename);
equal(lodash.contains({ 'a': 1, 'b': 2 }, 1), true, '_.contains should work with objects: ' + basename);
equal(lodash.contains([1, 2, 3], 1, 2), true, '_.contains should ignore `fromIndex`: ' + basename);
equal(lodash.every([true, false, true]), false, '_.every: ' + basename);