Make _.times return an array of the results of each callback execution. [Closes #73]

Former-commit-id: 808af6b9eb07bf1fada8221ca659558d82e6eb57
This commit is contained in:
John-David Dalton
2012-09-17 21:48:14 -07:00
parent 10064c046c
commit 93b89a93c1
4 changed files with 208 additions and 178 deletions

View File

@@ -1544,6 +1544,16 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.times');
(function() {
test('should return an array of the results of each `callback` execution', function() {
deepEqual(_.times(3, function(n) { return n * 2; }), [0, 2, 4]);
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.unescape');
(function() {