mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
adding OO-style object wrapping (thanks macournoyer) -- now you can to _(array).each();
This commit is contained in:
@@ -11,6 +11,12 @@
|
||||
return timesTwo;
|
||||
});
|
||||
|
||||
JSLitmus.test('_(list).each()', function() {
|
||||
var timesTwo = [];
|
||||
_(numbers).each(function(num){ timesTwo.push(num * 2); });
|
||||
return timesTwo;
|
||||
});
|
||||
|
||||
JSLitmus.test('_.map()', function() {
|
||||
return _.map(objects, function(obj){ return obj.num; });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user