mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
adding an isArguments checker and enabling iteration (using each) over JS object hashes that have numeric length properties
This commit is contained in:
@@ -29,6 +29,10 @@ $(document).ready(function() {
|
||||
answer = null;
|
||||
_.each([1, 2, 3], function(num, index, arr){ if (_.include(arr, num)) answer = true; });
|
||||
ok(answer, 'can reference the original collection from inside the iterator');
|
||||
|
||||
answers = [];
|
||||
_.each({range : 1, speed : 2, length : 3}, function(v){ answers.push(v); });
|
||||
ok(answers.join(', '), '1, 2, 3', 'can iterate over objects with numeric length properties');
|
||||
});
|
||||
|
||||
test('collections: map', function() {
|
||||
|
||||
Reference in New Issue
Block a user