MCPcopy
hub / github.com/lodash/lodash / arrayMap

Function arrayMap

lodash.js:648–657  ·  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

646 * @returns {Array} Returns the new mapped array.
647 */
648 function arrayMap(array, iteratee) {
649 var index = -1,
650 length = array == null ? 0 : array.length,
651 result = Array(length);
652
653 while (++index < length) {
654 result[index] = iteratee(array[index], index, array);
655 }
656 return result;
657 }
658
659 /**
660 * Appends the elements of `values` to `array`.

Callers 14

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

Calls 1

iterateeFunction · 0.70

Tested by

no test coverage detected