MCPcopy Index your code
hub / github.com/deployd/deployd / baseMap

Function baseMap

test-app/public/sinon.js:14169–14177  ·  view source on GitHub ↗

* 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 n

(collection, iteratee)

Source from the content-addressed store, hash-verified

14167 * @returns {Array} Returns the new mapped array.
14168 */
14169 function baseMap(collection, iteratee) {
14170 var index = -1,
14171 result = isArrayLike(collection) ? Array(collection.length) : [];
14172
14173 baseEach(collection, function(value, key, collection) {
14174 result[++index] = iteratee(value, key, collection);
14175 });
14176 return result;
14177 }
14178
14179 /**
14180 * The base implementation of `_.matches` which doesn't clone `source`.

Callers 1

baseOrderByFunction · 0.85

Calls 2

isArrayLikeFunction · 0.85
iterateeFunction · 0.85

Tested by

no test coverage detected