Optimize _.contains for arrays.

Former-commit-id: 050743f77e7047f86d5b14b97d35846c9d2e749c
This commit is contained in:
John-David Dalton
2013-08-26 22:32:20 -07:00
parent c3f5bc6bfb
commit ea8e6d978d
7 changed files with 29 additions and 25 deletions

View File

@@ -562,6 +562,7 @@
(function() {
_.forEach({
'an `arguments` object': arguments,
'an array': [1, 2, 3, 1, 2, 3],
'an object': { 'a': 1, 'b': 2, 'c': 3, 'd': 1, 'e': 2, 'f': 3 },
'a string': '123123'
@@ -598,7 +599,7 @@
strictEqual(_.contains(collection, 'd'), false);
});
});
}());
}(1, 2, 3, 1, 2, 3));
/*--------------------------------------------------------------------------*/