Bump to v3.7.0.

This commit is contained in:
jdalton
2015-04-15 21:06:16 -07:00
parent d58549ce0b
commit 863bb301bb
120 changed files with 1653 additions and 812 deletions

View File

@@ -1,4 +1,6 @@
var baseEach = require('./baseEach');
var baseEach = require('./baseEach'),
getLength = require('./getLength'),
isLength = require('./isLength');
/**
* The base implementation of `_.map` without support for callback shorthands
@@ -10,9 +12,12 @@ var baseEach = require('./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;
}