Bump to v3.7.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:49:35 -08:00
parent 9724afd7a6
commit fec213a98c
121 changed files with 1686 additions and 815 deletions

View File

@@ -1,4 +1,4 @@
define(['./baseEach'], function(baseEach) {
define(['./baseEach', './getLength', './isLength'], function(baseEach, getLength, isLength) {
/**
* The base implementation of `_.map` without support for callback shorthands
@@ -10,9 +10,12 @@ define(['./baseEach'], function(baseEach) {
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var result = [];
var index = -1,
length = getLength(collection),
result = isLength(length) ? Array(length) : [];
baseEach(collection, function(value, key, collection) {
result.push(iteratee(value, key, collection));
result[++index] = iteratee(value, key, collection);
});
return result;
}