Sync underscore build with Underscore v1.5.1.

Former-commit-id: 333f720645f5ffec079bfe11558ed72a3956ed18
This commit is contained in:
John-David Dalton
2013-08-27 09:12:50 -07:00
parent c6340a64fe
commit a1507d4844
9 changed files with 83 additions and 124 deletions

View File

@@ -4309,11 +4309,13 @@
* // => also calls `mage.castSpell(n)` three times
*/
function times(n, callback, thisArg) {
n = (n = +n) > -1 ? n : 0;
var index = -1,
result = Array(n > -1 ? n : 0);
result = Array(n);
callback = baseCreateCallback(callback, thisArg, 1);
while (++index < n) {
result[index] = callback.call(thisArg, index);
result[index] = callback(index);
}
return result;
}