MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / arrayMap

Function arrayMap

lib/web/jshint.js:2935–2944  ·  view source on GitHub ↗

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

(array, iteratee)

Source from the content-addressed store, hash-verified

2933 * @returns {Array} Returns the new mapped array.
2934 */
2935 function arrayMap(array, iteratee) {
2936 var index = -1,
2937 length = array.length,
2938 result = Array(length);
2939
2940 while (++index < length) {
2941 result[index] = iteratee(array[index], index, array);
2942 }
2943 return result;
2944 }
2945
2946 /**
2947 * A specialized version of `_.max` for arrays without support for iteratees.

Callers 3

baseSortByOrderFunction · 0.85
unzipFunction · 0.85
runInContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected