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