mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Issue #70 -- implementing each, find, all, any, etc. without the use of a try/catch/throw. Minor speedup + avoids destroying the stack trace.
This commit is contained in:
@@ -15,15 +15,6 @@ $(document).ready(function() {
|
||||
equals(_.identity(moe), moe, 'moe is the same as his identity');
|
||||
});
|
||||
|
||||
test('utility: breakLoop', function() {
|
||||
var result = null;
|
||||
_([1,2,3,4,5,6]).each(function(num) {
|
||||
result = num;
|
||||
if (num == 3) _.breakLoop();
|
||||
});
|
||||
equals(result, 3, 'broke out of a loop');
|
||||
});
|
||||
|
||||
test("utility: uniqueId", function() {
|
||||
var ids = [], i = 0;
|
||||
while(i++ < 100) ids.push(_.uniqueId());
|
||||
|
||||
Reference in New Issue
Block a user