* 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)
| 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`. |
no test coverage detected