MCPcopy Create free account
hub / github.com/lodash/lodash / arrayMap

Function arrayMap

lodash.js:633–642  ·  view source on GitHub ↗

* A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array.

(array, iteratee)

Source from the content-addressed store, hash-verified

631 * @returns {Array} Returns the new mapped array.
632 */
633 function arrayMap(array, iteratee) {
634 var index = -1,
635 length = array == null ? 0 : array.length,
636 result = Array(length);
637
638 while (++index < length) {
639 result[index] = iteratee(array[index], index, array);
640 }
641 return result;
642 }
643
644 /**
645 * Appends the elements of `values` to `array`.

Callers 14

baseToPairsFunction · 0.70
baseValuesFunction · 0.70
baseDifferenceFunction · 0.70
baseIntersectionFunction · 0.70
baseOrderByFunction · 0.70
basePullAllFunction · 0.70
baseToStringFunction · 0.70
createOverFunction · 0.70
lodash.jsFile · 0.70
unzipFunction · 0.70
unzipWithFunction · 0.70
pickByFunction · 0.70

Calls 1

iterateeFunction · 0.70

Tested by

no test coverage detected