Repository URL to install this package:
|
Version:
5.0.0-rc.11 ▾
|
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var isArrayLike = require('./isArrayLike.js');
var _baseEach = require('./_baseEach.js');
/**
* The base implementation of `_.map` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike.default(collection) ? Array(collection.length) : [];
_baseEach.default(collection, function(value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
var _baseMap = baseMap;
exports.__moduleExports = _baseMap;
exports.default = _baseMap;
//# sourceMappingURL=_baseMap.js.map